Here’s the way I understand it, I’m sure others can correct me if needed:
To the extent that the labor in third world countries are acquired voluntarily, then those workers are choosing to work in factories because it is their best option. Whatever they receive in compensation, they perceive it to be worth more than their labor.
Now, to the extent that the country imposes legal tender laws, central banking, or a currency peg (for example, China, Philippines), those wages the workers earn are devalued as fast as the US can print. This is why we’ve been able to export so much inflation, which keeps some third-world countries poor despite having produced so much for us. If these countries had free economies, the dollar would become worthless in those countries because there would be excess dollars relative to real goods, and the price of labor (in dollars) would go up which would collapse the trade deficit.