This is unfortunately a complex, multivariate system problem and won't rely solely on the "quality" of a teacher in it.
In addition to the behind-the-scenes work most teachers have to deal with, such as departmental objectives, I think great teachers enter the profession in order to benefit children, not to get that fantastic paycheck . It's a socially focused decision, not an financial one, so if I were designing a system to grade a teacher's quality I would focus on attending to their efforts with students, not throwing more money at them.