If your topic is broad enough, you can abuse napkin math any way you want to reach any sort of conclusion.
Virtually all instances of protectionism has caused the industry being protected to stagnate. If Intel weren't facing competition from TSMC and Samsung, they would happily milk their 14mm process for who knows how long.
The only time when protectionism is a unequivocally a good thing is with services with no obvious societal benefit. I don't think China loses out from not having Instagram or Facebook. Even if their domestic alternatives are worse, they aren't missing out on much. Likewise, I don't think we'd lose out much if everyone was forced to use Youtube Shorts instead of TikTok.
This basic idea scales up to the country level provided all the rules and regulations do not interfere. The problem with the shrinking status of the lower classes in the USA is not division of labor throughout the world. The imbalance of worldwide division of labor is primarily a symptom of disastrous monetary policy by the Federal Reserve bank and Congress and ill conceived regulations.
That said, the comment you are replying to didn't provide any sources, but if you google, for example, "china outsourcing effect on middle class", it's easy to find research supporting the conclusion that outsourcing had a real negative effect on large swaths of Americans.
Also, as a counterpoint, lots of other countries that have had a more robust middle class in the past 2 decades have stricter regulations than the US does.