I think it's important to note that unions aren't very good tools to avoid layoffs. If there is a company specific hardship, the union can't simply force the company to maintain headcount all the way into bankruptcy. On the other hand if there is a secular change across the industry, the unions can't prevent that change either. Easy example is how Big 3 automakers were 100% unionized in the 1970s and have since shed about 500,0000 American jobs despite producing more automobiles than ever.
Unions tend to be good at bargaining for better pay and benefits, but the current status quo is that most tech workers already have decent pay and benefits anyway.