I did an analysis some years ago in Ontario, Canada. I worked from the Education Act and the financial disclosures of the school boards.
A secondary school teacher was required to work 750 hours per year. That works out to a little over 4 hours per day for about 180 days (40 weeks). When I did the math, the average secondary school teacher in Halton Region earned $82.63 per hour. Add to this sick days, and the best pension system in Canada.
They are better paid than family practitioners.
I know, some work more hours. But they do not 'Have To'.
Teacher never have to travel. They don't have to leave their families. They are home for the daycare pickup without rushing.
I have no sympathy when they complain!
As someone whose property taxes have just gone up because of a school levy, I don't ever want to hear teachers complain about how they don't make enough money.
Is the definition of "work" actually instructing the full class? That is probably the 4 hours a day made up of 5 classes of 50 minutes each. That is certainly not the entire time that a secondary school teacher is working. There is also planning, preparing lessons, writing tests, grading papers, tutoring individual students, calling or meeting with parents, counselors or administrators, record keeping, etc.
I do not think that teachers are underpaid. I would like to compare,however, a conscientious academic subject teacher's 50 hours a week for 40 weeks with a person who punches a time clock 40 hours a week for 50 weeks.