How do you do that? Isn't it true that with the way teachers are organized you pay everyone the same based on some blanket criteria like seniority? So you can't pay the good ones handsomely without also paying the bad ones well, which breaks the bank. If you try you get some combination of union/legal/government action that ties you up.
In principle the solution is trivial. You raise the bar for becoming a teacher (supply will grow as well if salaries are much higher and there are these benefits like respect and autonomy). And then if some bad teachers do get in, the institution uses personalized oversight (in the form of "good" teachers observing and critiquing "bad" ones), and any problem teachers are given a smaller load with additional training. In other words, you invest to make all the teachers good.
The question is whether public schools have the funding to do this, and that's a more political question.
I don't see why it's unreasonable to expect a math teacher to be on par with the average person who gets a math Bachelor's. The reality today is that math teachers take special "watered down" math courses with lowered expectations and less work. I know because I witnessed it first hand.