Software engineers already have a lot of leverage. If you have a boss telling you you have to work crazy hours just say no. If you aren't using the bargaining power you already have a union is probably not going to help you.
In unions bosses break the rules continually and you only get them enforced by persistently filing grievances in the face of a lot of blowback, sometimes from the upper echelons of the union itself because they don't like people rocking the boat too much.
In the grievance game management and union sit down every month or so and take the list of proposed disciplinary actions against employees (firings, suspensions, etc) and the list of grievances filed against management and swap them out to prevent the people with the most seniority from getting fired. A lot of valid grievances will get ignored because they were traded out so some old timer could keep their job - not exactly the epitome of justice.
Having a written contract does provide leverage but not as much leverage as being able to tell your boss that their project will fail and they will lose money if they don't give you what you want. Not every software engineer is going to have that kind of leverage but if you want it you are probably more likely to get it by using your existing skills than by trying to organize a union.
It takes months to find a good developer of any type on the open market (in Chicago at least).
Domain knowledge in the vertical markets in which we operate takes months after hire as well.