I think you really, really underestimate the difficulty of making "self replicating nanites". The first question is what chemicals to use.
We know of one self-replicating microscopic organism technology: bacteria. They need chemicals found in air (in various abundances), a little sulfur and phosphorus, and energy. The main problem with this chemistry is that natural bacteria are likely to find your "nanites" tasty, and are likely to rapidly evolve novel ways to eat them.
The other path is probably what you're thinking of, metal robots. Well, metal robots need metal, silicon chips, and energy. Note that "silicon chips" require dopants: usually one of boron, aluminum, gallium, or indium, plus one of phosphorus, arsenic, antimony, bismuth, or lithium. Then to make one new nanite, a bunch of nanites need to form a chip fabrication lab. We've seen how long humans take to do that.

Even ignoring how many more chemicals they'd need.
I'm sure I've skipped over lots of problems with both approaches. Suffice it to say any nanites we use won't be self-replicating for a very long time. How to manufacture anything with nanites is also a very open question.