My father went from being a union steward to having grievances filed against him as a member of management during his ~40 years at GE.
I've seen both sides.
imo, unions are best suited for workers who have no leverage: at jobs where the worker is an interchangeable part, or is unspecialized, or where the labor market is flooded, or when they want to minimize changing employers - software development is none of the above.
Personally, I think software developers should be paid 2-4x what they are now - I say that as a developer, and as an employer who cut their checks at a company I helped start. Their value-add is just way higher than the current pay rate reflects.
How to achieve that? Maybe a professional organization is needed - similar to doctors - but a union and all its trappings? Meh.