Why not make a much less depressing comparison and compare developer wages to manual labourers or retail staff? Compare a typical developer to a typical retail worker and we get way more money for way less stress. We're not at the top end of the scale, but we are nowhere near the bottom either.
We get to sit in comfortable offices, working on interesting projects (mostly), building things that make a difference to people, without getting dirty or abused by the public, and we're pretty well paid for it on the whole. And there's always the possibility that we might hit on an idea that returns literally billions of dollars. Or work for someone else who had that idea and walk away with literally hundreds of millions of dollars. Most people don't have that sort of opportunity.
I've been a professional developer for over 20 years, and I've enjoyed most of it. It afforded me the opportunity to do my own startup for a while, and when that failed it was easy to get back in to work with a job that pays quite well. I certainly wouldn't want to do anything else.