There's a reason that tradespeople get paid what they do. (and IMO, it is still very underpaid)
Electricians have to work in less than desirable conditions (dusty attics, outdoors, etc). Most of the material is your responsibility.
Accidents can and do happen. The days where you are less than 100% but you would be able to WFH don't exist.
Think it's annoying to plug a network cable under your desk? It's like that but 7hrs per day or more.
I hate that this is true, and am glad I found a way to make a living that avoids both, but congratulations on getting to the core of the matter with great clarity.
In Software Development, you can "get by" with an effort between 2-6 (where 5 is an average worker) or you can "excel" with an effort of 9-10, but putting in a 7-8 just stops being be worthwhile after a few years. Compare that to a local business owner, where greater hustle always appears commensurate to a greater reward.
Whereas a Pro Bowl quarterback or A-list movie star is worth maybe $100s of millions to a team or studio relative to players/actors who are "only" very competent. Coders are somewhere in between.
Productivity (or impact of code written) though, it might as well be closer to the power law distribution