There's an entire books series on this concept, the "Gingery" books where the first in the series is setting up a foundry for casting, while the second is making a lathe from investment castings because a lathe is the only tool in a workshop which can duplicate itself.
https://gingerybookstore.com/
the balance of the books are making the other tools in a machine shop.
Had the second book once upon a time, and will eventually get the entire set.