Which country were you in at the time? Union laws vary substantially by country so I think this is relevant to understanding different unions and people's experiences with them.
That seems hostile and designed to enable corruption
I think that some software engineers in Germany are covered by the larger unions like IG Metall and Verdi, but my understanding is mostly for those that work in companies that make physical goods like Mercedes, Siemens, etc.