Anecdotally, I'm a software engineer. My wife is a physician. We'll be in our 50's before my wife's career out earns mine. That financial hole of med school and residency is so deep and the salaries on the other side just aren't _that_ much better than other paths. I didn't even pursue FAANG level salaries, either.
That being said, job security and availability is far, far better for my wife. We can basically live anywhere we want and she can find a job.
The front line primary care doctors and nurse practitioners dont make as much as IT people quite often.
Data on doctor salaries is very difficult to come by publicly, however H1B salaries indicate the average pay for H1B PCPs is $200k [0]. These are the lowest paid physicians. If you look at the data, many many physicians are making much more than that - with many specialities averaging $300k+. Generally H1B workers make less than comparable native-born (even though that's illegal) so we should view this as a lower-bound.
That puts hourly pay for average PCPs lower than the top SWEs, but comparing average with average or specialty with average and you're already quickly outpacing large majority of SWEs.
An OB/GYN or anesthesiologist is closer to $200k+
Of course, there is a typical shortage of doctors prying for this coveted physicianhood /s
You mean it's not us tech workers? :P
Seriously though, I've seen the pay scales in some countries, they're nice and all, but they come with many extra years of training (expensive plus limited income while you do that), plus shift work and overtime that is bad for everyone (staff and patients) and which shouldn't be necessary — and wouldn't be necessary, if most nations all hired about twice as many of them… but that would require us to also train twice as many and politicians who do that get the budget shortfall today while their successors (possibly in other countries) get the reward for the benefit of their being more trained doctors and nurses.
I'd pay them the same for less hours. Mandatory less hours — go home and sleep, let someone else tend to this patient while you rest.
I have no clue if that's improved (with another decade of training, since I dropped out), but an even larger majority are miserable.
Every working stiff at all income levels sacrifices disproportionately to their income, and if I were a high school teacher, I'd belly laugh at this doctor pity party.