Your obsession with a poison pill is quite bewildering, because you're constructing an elaborately implausible scenario where:
1. union power is increased (let alone maximized to pre-70s levels) in the United States
2. the software industry is unionized
3. the unions turn hard right and start adopting 19th century attitudes towards immigrants
In this wildly fantastical situation, would you even say that a poison pill could even do anything against such a reactionary wave? If American society had somehow gone so xenophobic, unions would probably be the last thing we would have to worry about in such a dystopia. Not to mention that any legal fig leaf like your poison pill would be no more protective than a parasol in a tempest.
By-the-by, I would suspect that the essential elements of your vaunted "poison pill" is already part of the bylaws and charters of most modern unions. Take the SEIU constitution for instance: https://d3jpbvtfqku4tu.cloudfront.net/img/constitution-2016....
> We believe our strength comes from our unity, and that we must not be divided by forces of discrimination based on gender, race, ethnicity, religion, age, physical ability, sexual orientation, or immigration status.