I've worked in a vast range of tech sectors over the years, with people being laid off and companies shutting down. I cannot think of a single time in 25 years where someone was let go for a reason that a union could have prevented. The whole "righting the ship" concept is what took nearly all of the jobs. Poor planning by management, failures in the industry and global economics were the causes and for that reason all those workers had negative ROI.
I like the idea of a union. Especially in an industry where businesses are lowering the requirements for entry (i.e. bootcamps replacing degrees). The problem is that tech can be fly by night. Especially when it is a purely software based solution. The money and time investments to start up and maintain aren't comparable to those of manual labor. Building a factory puts a company in far more of a bind than renting some cubical space. Meeting OSHA standards, logistics, permits, etc. All things that force companies to the negociation table. When your company is software and you outsource hardware to a product mill in China it is way easier to fire a ton of people because the projections look bad.