Part of the reason that the writers guild and screen actors guild works is because they have a single union that represents everyone with all employers, and their union members won't work with employers who don't honor the union agreement.
So it would need to be similar. A single programmers union that sets minimums, where union members won't work for companies that don't follow the union rules.
So like in Hollywood a tiny production will not follow union rules but are limited to using up-and-coming actors who aren't in the union. Startups would be similar -- they could hire up-and-comers, or agree to follow the union rules, one of which is not hiring anyone not in the union.