I’d argue a software engineer is more critical to modern society than a teacher tbh.
Firefighter yeah those provide an essential service to society.
But the modern education system is a joke and people who go into teaching most commonly do it because they have chosen useless degrees that can’t get them any other jobs.
Many are also useless at actually doing their jobs as well. I had to tell my IT teacher how to use the software they were meant to be showing us how to use.
The old adage rings true in my experience:
“Those who can do, do. Those who can’t, teach.”
In any case, the market sets the game. If you can make more money as a computer engineer than as a teacher it’s because society as a whole collectively decided they have more value. This is not due to politicians or anyone else’s opinion, it’s a natural process.
I am of course a little biased but it is perfectly logical to me: we live in a world dependent on technology and without computers society would collapse.