A 1980 NASA study entitled Advanced Automation for Space Missions proposed a complex automated factory on the Moon that would work over several years to build a copy of itself. Exponential growth of factories over many years could refine large amounts of lunar regolith. Since 1980 we have seen several decades of technological progress in miniaturization, nanotechnology, materials science, and additive manufacturing (or 3D printing).
The power of self-replication is compelling. For example, a 1 kg solar-powered self-replicating machine that takes one month to make a copy of itself would, after just two and a half years (30 doublings), refine over one billion kilograms of asteroidal material without any human intervention. Ten months later you would have one trillion kg of whatever metal(s) are used to make the devices, which could then be "harvested" at any time. No large mass of equipment need be delivered to the asteroid; in effect, only the information that went into designing the device plus the 1 kg device itself.