Easy: develop the “developing” world as fast as possible, so their wages rise to levels comparable to ours. It means short term pain here (and there - the early phases of industrialization aren’t pretty) - but in the long run everyone will be better off.
This article on Ford relocating is an example of what you describe.
Unfortunately, I think you're right. Either that, or we become old Soviet Russia. I am by no means enamored with the idea of "free trade" per se, but I just don't see an alternative that isn't worse.
Also unfortunately, our schools are doing such a crappy job that we are rapidly losing ground vis-a-vis the absolute quality of work force.