There is no way to fully remedy the harms you've described, that's true. A strong welfare state with unionization where possible is the best system we know of at the moment.
I don't think a strong welfare state with unionization where possible really even begins to address the macro problems of globalization and automation. Well, maybe a smart union could address automation by lobbying for robot taxes.