Maybe? Anecdotal I guess, but I've met more plumbers with chronic knee and back problems than software engineers. But being a plumber in the US isn't too physically demanding, and makes OK money, so it's probably the example of disparity the GP was trying to highlight.
A software programmer will be front of a computer screen, 8 hours, 5 days a week in a sedentary position - they are at risk for problems of eyes, back & neck problems, carpal tunnel, weight gain, anxiety, heart disease, insomnia, deep vein thrombosis just top of my head.
They technically have the option of a chording keyboard/mouse and a wearable computer. Or at the very least a standing desk (or even a treadmill desk). Along with special glasses or monitor filters.
Yes in the way that someone with a multi-million dollar trust fund who wants to buy a nicer car or bigger house and someone working for minimum wage both have money problems.
Especially when working from home any health-related dangers around software development can be all but completely eliminated. This isn't even remotely comparable to any of the health or occupational risks in the trades.