This is the end result of arbitrage opportunities due to differences in nations’ wealth.
I've traveled the Midwest and great plains extensively every year since 2009, and have watched it slowly destroy small town life. The locals fought back as much as they could, but saving an extra $50 a week ended up being too alluring, and local businesses died. I've talked to quite a few people that lament how it turned out but are completely resigned to how it happened and that it won't change.
You can zoom out of the Walmart vs local store picture, and imagine you're in charge of decision making at a large manufacturing company, and your competitor has moved their production to a country with cheaper labor. Is your company going to be able to sell your products at a higher price if you choose to use more expensive labor? Are you going to be able to convince customers that their decisions now will cause income instability for their children and children's children, and that they should spend $x more on your product because of it?
But due to information asymmetry and limited ability to analyze and understand the consequences of each and every purchase, there was only one inevitable outcome, assuming goods and services are allowed to be transported between borders.
Think about the benefits of saving money, it creates opportunity for growth.
Side note, mom and pop shops made more profit than Walmart. That money is not shared with employees, it makes the family wealthy.
That said a framework which ensured some minimum requirements (like labor laws and environmental controls, work safety, etc.), could be a place to start.
Labor laws and environmental controls would have to be implemented globally, but then we're talking about going to war and taking over other countries.