The one basic principle to automate can be that automation should be used as a means to supplement human productivity , but if it replace the basic livelihoods of human beings then it should be taxed and the proceeds distributed as UBI. After all what is the point of automation of it ends up causing suffering for us?
This is a tough one, and I think is a bug of the current system, and only serves to hold us back. I'd like to think that one day we'll reach the point where UBI is practical. We're not there yet, and we need to do more in the interim offset the impacts of automation to workers losing their livelihoods as a result.
These workers, in particular, I think would be the most ideal candidates to make and monitor this automation. Send them to college part time to learn the skills they need for this.
Re-training programs to teach them new skills to make a horizontal (or upward) shift in the workforce seems like a no brainer.
Problem is, who's going to front the capitol for this? If we forgo automation at the ports, it will impede the potential cost savings of shipping goods into the US, making importing goods less attractive to everyone involved. Re-training can be expensive as well, who's going to front the capitol to pay a mid-career worker with a family a similar salary to re-train?
Our system has failed horribly with this, and it needs to come up with something as more and more jobs are sought to be automated out of existence. There's no reason why we should have to avoid technical progress just to make sure people can keep collecting a paycheck.
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