Software: https://www.bls.gov/oes/current/oes151252.htm
Mechanical: https://www.bls.gov/oes/current/oes172141.htm
The 75th percentile for Software is $151k vs. $120k for Mechanical. Median is $120k vs. $95k.
So about 20% higher for Software.
I would have expected the difference to be higher based on levels.fyi and anecdotal salaries shared on HN. I guess the average software engineer also isn't working for a top 5 tech company who pay well above average.
It's interesting to look at fintech, where banks purchase tech focused company with great engineers because their internal IT simply can't compete thanks to a cost-center culture.
Any industry that doesn't have a regulatory moat around it has tech circling it, looking for the parts of the business with the biggest margins. Even Amazon and Apple are timidly entering highly regulated markets such as health.
I don't agree those other engineers are treated as cattle, merely as normal employees. IT, mostly in SV and other places cargo-culting ie Google is often really treated like divas. Bear in mind that this was never true in corporations where IT was treated as a cost center, ie banking. But from various HN posts it seems that typical young SV dev has no experience with that and many feel they are changing the world for the better, when reality its at best a zero sum game, and often not even that (ie optimizing ad revenue stream for your corporation is definitely loss for mankind as a whole, or anything that makes societal parasites who breed depression like facebook/insta/tiktok more effective at their goals).
But folks for some obscure reason need to feel that their work has a good purpose and high moral ground, hence sometimes quite advanced mental gymnastics seen also here.