I don’t think re-educating the affected workers will work for everyone. We need to acknowledge everyone is not used to adapting to continuously changing technology as a frontend developer is. Also everyone has a threshold of complexity beyond which they may find it difficult to comprehend something. It is not a handicap it is just the normal state of things. As humans we need to accept our strengths and weakness.
Developers earn their high salaries partially because of their abilities to adapt, why should longshoremen earn comparatively just because they're a warm body in a union? They can earn high salaries for all I care, but they should earn their keep