The better a teacher you are, the more assured it is that your students will surpass you. This can sometimes leave you with some regret, asking yourself if you’d have been better served by turning those skills more to your own benefit than towards teaching others.
Who knows? Maybe it would have. But you chose to teach for a reason. Whatever your subject, whoever your students, that reward is a different thing altogether. Be glad of it; may we all be so cursed.