These "unions" in high paying fields behave more like guilds or cartels than worker's unions - they generally restrict supply. Athletes and Hollywood unions are sort of special cases too, IMHO. I don't think it's reasonable to claim that top earners in those fields earn so much because of their unions - they benefit from natural supply restriction of outliers.
For unions to be as effective in tech as for say pilots or doctors, you'd have to agree on a way to restrict supply (H1B restrictions, more licensing and credentialling etc) to give the union leverage. You have to control the supply taps and rate limit entry to the field.
I think it's hard to say if this would net out better for workers than the current arrangements, which are already the best in the world on nearly every metric.
It also seems like there's a timing issue - if tech workers DID successfully unionise enough to withhold a meaningful fraction of labour, the gains might ultimately end up in the market cap of AI companies via substitution.
I don’t think pilots unions do much to restrict supply.