But there is a solution (from the prospective of employers) for this "problem": every time you hear someone talk about "teaching everyone to code" or "the STEM shortage" (which absolutely does not exist -- there is a shortage of qualified programmers willing to work for $12/hr, a shortage of hard science PhDs willing to do menial lab work for 10$/hr) this is coded language for "let's make millions more programmers so that they become so commonplace they become a commodity and may be treated as such". As it turns out, programming is not that hard, anyone could do it if they learned. And they are learning.
Programmers would be smart to unionize before this strategy succeeds, not after, it will be much easier while they still have power. But this requires social and political intelligence, and for programmers (who lean Libertarian up until the moment they get laid off or abused by their boss) to put their egos aside and disabuse themselves of the notion that they succeeded only because they are so much more brilliant than everyone else.