You pay them handsomely rather than the pittance they receive from most schools. Great teachers are worth it.
The question is whether public schools have the funding to do this, and that's a more political question.
"If you were building an online school", you could do that. But if you manage a public school, you have no chance.