Also, with higher wages comes increased interest in the position and more ability for schools to actually say no to and filter out bad teachers. It's hard to turn away a warm body when there are teacher shortages everywhere.
Anecdotally, I got very lucky with a newly built public school. I had class sizes of < 15 and overwhelmingly positive experiences as well as one of the best classroom experiences of my life with a retired physics/math professor teaching us 3d geometry and discrete maths.
It was like learning in a theoretical sandbox, having every fleeting thought or hypothetical exploration answered with ease, all completely out of the curriculum scope.
That to me is what i imagine education could be if there was enough money in the system and if people actually cared about the education of future generations.