Depends on where the factories are located. If it's a mineral-rich world/moon/asteroid, in theory, you could automate the whole process using only local sources. You'd probably readily stripe mine an asteroid is a few years/decades, probably, but something like Mecury, the Moon, or Mars could probably last a while. It's not stated how long the Autofactories have been running in the lore (or has it yet?), so kinda hard to tell. Also, I don't think the infrastructure of civilizations has been fleshed out well enough lore-wise. So for all you know, each auto-factory has one or more "auto-mines" associated with it. (Or even be its own auto-mine.)
Still, not having human workers to tend to does cut down long-term cost significantly. (Though I imagine the initial short-term upfront investment cost would be astronomical.) Most of the cost even in modern society isn't in the materials; it's usually the labor. Of course, rarer, scarce, and/or high-demand materials can command prices measured in human lives sometimes in games.
There's still a maintenance cost in materials for the robots and facilities though.