It is a fallacy to believe that international trade restrictions are required to prevent jobs from flowing from high-wage to low-wage countries. The Dutch Republic was a leader in international trade from the 1590s to the 1740s. They had some of the highest-paid workers in the world. Economically, the central flaw in the high-wage argument is that it confuses wage rates with labour costs - and labour costs with total costs. We measure wage rates per hour of work and labour costs per unit of output. Total costs include labour, the cost of capital, raw materials, transportation, and other things needed to produce and bring the finished product to market. Workers in a prosperous country who receive wages twice as high as workers in a developing country and produce three times the output per hour have the advantage. The high-wage country has lower labour costs per unit of output. The savings may be due to better organisation, more/higher-quality machinery, or greater economies of scale. Transportations costs are also usually lower in developed countries. A country is often wealthy precisely because it is more efficient at producing and delivering output. An international consulting firm determined that the average productivity in modern sectors in India were 15% of that in the United States: paying an Indian worker one-fifth that of an American worker would still be a worse deal.
Job losses occur in those areas where another country has a comparative or absolute advantage. The losses are usually more than made up in the boost to the economy overall. Those who lose jobs undeniably suffer, but restrictions to international trade causes more people to suffer - it is only that the damage is more diffuse.
The capital costs, such as electricity and railroads, are cheaper in more prosperous countries due to their relative abundance. Even if a developing country has lower labour costs, higher capital costs negate any advantage.
The forces at play in international trade are at play throughout a nation’s economy all the time. It is more salient in this context because it involves foreigners - politicians take advantage of this, exacerbating the unjustified discontent.