A confluence of external factors helped make China an economic power. Taiwan had industrial expertise and Hong Kong money and finance.
Taiwan needed to move up the consumer chain of products, as it's labor was getting too pricey to continue producing cheap items, while Hong Kong had little choice as it was reuniting with China in 1997.
In the Clinton Era, there was hope that communism was going to fade away for good, and that boosting China's economy would create a middle class who would then demand democracy and a gentle transition would occur, resulting in a peaceful prosperous China being just like us. Fantasy unfulfilled. So Clinton granted China MFN and then allowed China to accede to the WTO as a developing nation (allowing it to continue protectionism for a substantial period).
Things could have gone very differently.
The US could have demanded political changes in China before granting preferential access to world markets. Or the US could have encouraged Taiwan and Japan and Korea -- all close US allies -- to ramp up manufacturing in India/Pakistan (or South America) as globalization and outsourcing kicked in in the 90's. It was not foreordained that China would become the factory of the world, and if you suggested such in the 80's or circa 1990, people would have chuckled at your outlandishness.
The US (and allies) could have been much more strategic about where to outsource manufacturing. We did that to some extent with NAFTA and Mexico, which was old partly on the idea of stabilizing Mexican institutions and raising wages there to stem immigration and drug crime. Not exactly a success, but some strategic intent, and some good has occurred.
During the Cold War, the US was very circumspect about trading with the USSR or its Eastern European satellites. When the Soviets invaded Afghanistan, Carter used his small economic leverage and stopped wheat sales to Russia.
I agree with Trump -- why does the US want to hand over $300M annually to China just to buy low-cost consumer products that can be produced most anywhere? Why enrich a country who is a competitor, a threat to the South China Sea, an occupier in Tibet, communist, engaging in a large-scale human rights disaster in its Muslim far west? China has become prosperous and the US has lost almost all influence over China.
(except the threat of boycotting China products and shifting production elsewhere).
In a way, it's great that China has helped a few hundred million people escape utter poverty. Quite an accomplishment in 25 years. But India could have had the same poverty-reduction, is a democracy, is more or less an ally (and would become moreso with increased trade), etc. While Pakistan likely would not have gone to the brink of becoming a failed state, and might have even not sponsored the Taliban (getting into far-speculation there, but if the military could have been making money as in China, they might not have cared much about meddling as much in Afghanistan. And Pakistan might have had the resources and institutional ability to control its lawless tribal lands). A prosperous subcontinent would have made a strategic bulwark against communist China and a recidivist Russia.
As Trump has said, the long-term China strategy has failed (no political liberalization), but big business is amoral as always and is happy with its profits. And the US Gov't has failed to course-correct.