It's been done many times before (weapons, food, etc.) and always leads to the exact same result: garbage heaps and no available resources when they're actually needed.
Offering companies grants and favors to encourage building real, sustainable, on-shore businesses has a much higher likelihood of success.
I assure you there would be plenty of customers for $10 cpus that are as fast as modern $100 cpus.
Smart tvs, routers, modems, drones, toys, iot devices.
That being said, the commenter you replied to is wrong. Yes, warehousing occasionally does lead to massive wastage. But warehousing in general is common even if it means things will be slightly more expensive. That's how the military is able to run equipment whose manufacturing ended decades ago. That's how manufacturing worked worldwide before JIT became widespread.
The reason it might appear warehousing doesn't work is because the news will report instances where it's gone wrong. They're not gonna report the significantly greater instances where things are working just fine, because that's not news.
So I'm arguing we should over-produce infrastructure and you're arguing we should over-produce capacity? OK but you have to continue offering the favors else the on-shore companies are just going to fold up when times get tough.
In a catastrophic event though I argue the over-provisioned group is better off than the group that can ramp up their production to post-catastrophe needs, the over-provisioned group has backup supplies and can produce at their normal rate, the over-capable group still needs time to spin up their production.
You don't really want over production, you only want the factories and employees who know how to do the job.
That's the USA's mistake.
China's capitalist zones with very low taxes attracted all the factories because at the same time the USA was increasing taxes on the factories. What is left in the USA? Nothing. How do you wage war when you dont hold cards?