This is already happening - there is an absolute glut of warehouse robotics companies at this point. Mostly in adding robotics to legacy warehouses. New warehouses will almost exclusively be built with automation in mind.
Automation is a cost optimization thing. If the union raises Amazon's costs, it pushes up the automation time frame. And if the union doesn't raise Amazon's costs, it probably didn't provide the workers any benefits.
Then the question for workers becomes would you like to have this job for longer with current conditions or for less time with better conditions.
I don't think an Amazon warehouse worker union is going to be able to get any sort of long term job availability promises from Amazon (but I could be wrong, of course).