There are decades of economic research based on hundreds of years of economic activity that contradicts your analysis.
EV and solar investments in the United States were on par with and exceeding china, they were gutted after republicans attacked the solindra investment for political reasons.
China is itself moving up the value chain and specializing.
That being said, I do think we have learned the hard way that outsourcing manufacturing destroys the ecosystem and supply chain that drives innovation. Simply put, invention happens where the work is being done