Automation can be scaled up and down much more effectively than labor. You just turn off the machines when you don't need them and turn them back on when you do.
There's a social sense in which you're correct - the machine wasn't counting on that wage, didn't cancel plans to be available, etc...
But from a financial perspective, most of the cost for the machines is probably in buying the machines, where most of the cost of the worker is probably hourly wage (or similar). Turning off the machines probably saves less money than sending the people home.
Scaling past existing max capacity at a port is a massive project whether or not they use human labor. It's not like those human laborers are taking the containers off the ships by hand...
Do you have a citation for this? The article makes a fairly compelling argument that the automation in ports is not flexible in its utilization and costs, and that humans actually are more scalable in this regard.