It was obviously foolish to help China become an economic power since the CCP has been at war with the US since the end of WW2 (2 Taiwan Straits wars, 2 Korean wars, Vietnam war), largely driven by Maoist ideology. (The USSR was involved in stopping the Straits wars to prevent wider conflicts.)
(The USSR dealt with an aggressive CCP by obliterating their forces during a border conflict using overkill. The CCP doesn't understand anything less. The USSR also planned to use nuclear weapons on Beijing around 1969, but the US intervened.)
I followed outsourcing to China in the business press from about 1972 to 2000. I shook my head at the end of each article. But here we are.
What's important to realize is that both the CCP and Russia make public statements and:
1) they're either obviously hyperbolic or
2) they accurately represent their actual plans.
#2 is not well-understood by our politicians for some reason. Pompeo is one of the few people to get it, hence the US' very effective strategy for the CCP during the Trump administration.
Note that China has structural weaknesses that will diminish its power: they import 50% of their energy and food, and have a demographic problem that could cut their population in half. They also have serious flooding issues, with 100,000 questionable dams built since 1945.
And the US can currently only make one F-35 per week, while in WW2 the P-51 was literally stamped out.