This could be accomplished through compensatory taxes or, as long as there is fiscal space, an increase in the spending on activities with high social returns, such as education and health. At the same time, some of the implemented policies  12  should aim at minimizing the welfare loss associated with the required reallocation process, for instance, by providing workers with additional training.
But one should be weary of policies that would sacrifice the substantial welfare gains from trade, and for that matter from automation. Confronting the redistributive policy challenges is better than simply pushing back trade or technological advancement.