Nope this is an outdated opinion. You can do just as well or better in trades (source: my electrician buddy). If you’re referring to the FAANG salaries (sub 1%) you’re comparing to doctors, lawyers, entrepreneurs in terms of opportunity cost. Your average joe programmer isn’t killing it like you seem to think, and they’d do just as well in trades or middle management.
The cynic in me thinks this is an opinion promoted by employers, just like the BS “labour shortage” headline.