Unfortunately for workers, these type of actions can only term delay their replacement only by a few years, if that. The only long term solution here is to go bigger and reconceptualize the entire economic system, a system that takes into account the new realities that AI has created, and provides justice to all.
Assuming you could only delay it a few years, that's still a few years more than many other people would have.
I myself doubt AI is quite as good in the real world robotics as it is in coding though, and collective worker action could instead give them a few decades or until broader economic changes allows them to leave that job without being hurt financially.