You don't know how competent the software engineers are in Europe, and saying "$140k for a software job is extremely high" is an arbitrary value judgment.
Stated another way, the things that software engineers can do with their wealth generally seem like normal middle class things. They can own a home but they can't afford a yacht. They can take nice vacations but they aren't part of the jet set. They can start businesses but generally not in capital intensive areas like resource extraction or heavy industry.
I'd say that software engineers, at least the higher paid ones, are probably on the higher side of middle class; but they are still solidly middle class.
When some hospital board member says "there's a shortage of nurses", they leave out the other part: "there's a shortage of nurses who will get puked on and verbally abused by patients for $40k/year".
When Mark Zuckerberg says "there are not enough good programmers", what he really means is "there are a not enough good programmers who will work 60 hour weeks for $150k in a Bay Area suburb where a 1,300 sqft suburban condo costs $2M".
I'm glad I got what I could out of this profession and started investing before the post-pandemic job market reduced us from "middle class" to "lower middle class". So far since 2018, I've managed to turn $20k into $1.4M by running my portfolio like Peter Lynch if Peter Lynch had experience in software and biotech.
My only regret is that I paid off my $28k car and $45k of student loan debt early instead of starting to invest in 2015, in which case I might very well be holding $10M and instead lamenting the $1k-2k of money I spent as a child in the 00s on N64/Gamecube/Wii hardware/software that could have Apple stock worth $200k today.
Yet again, we have classic HN speculation masquerading as authority.
Should software developer salaries be comparable to accountants or to surgeons? That's an arbitrary value judgment.
Software engineers have less purchasing power than they would without the H-1B visa program, and that's indisputable. 64% of the visas go to IT workers and 52% go specifically to programmers, which implies beyond all shadow of a doubt that their salaries decrease further than the cost of the goods and services they pay for.
https://www.uscis.gov/sites/default/files/document/reports/o...
It's all there, black and white, clear as crystal. You get nothing. You lose. Good day, sir!