We shouldn't right wrongs by deliberately capping economic efficiency, especially in sectors that are foundational to the rest of the economy (e.g. maritime trade and energy).
We shouldn't. Dockworkers should allow automation, and those jobs that remain should capture a fair share of the increased productivity in increased wages.