Both the solution and the problem is money. Countries want foreign businesses to invest in their citizens, provide employment, generate GDP, etc. Clothing companies (for example) want to maximise their profits and, if their consumer profile is high enough and their product is in demand then that is where it goes wrong - higher and higher profits driven and able to be driven by employees of a low social economy with nobody fighting for their rights.
Companies that do care will not be strong-armed into accepting whatever conditions the host company demands - they will stipulate that employees are treated and paid fairly and expect proof of this. They will send in their own auditors, unannounced, to ensure that this is so.
In order for this to be viable, a company has to be certain that its customer base insists on fair pay and conditions for workers making the clothes. If the customers are more interested in cost-savings then there is no impetus for the company to put in place anything but the bare minimum required - and the cycle continues.
The only thing that would really make the change needed is regulation - huge import taxes with the host country being forced to demonstrate that fair pay and conditions are permanently in place. That could also be the driver for manufacturing to move back to the UK/EU if the cost differential is marginal.
Money talks.