Teaching is a necessary evil on the track to success. To legitimate your work, you must have an institutional affiliation; and in order to maintain an institutional identity, you must teach. There are two ways out of this unfortunate situation:
ONE: Reduce your teaching work. Demand an assistant to grade exams. Settle your lectures into a standard form, timed to fill each class precisely.
You might object that writing lectures so carefully takes time and effort, and so it does at first.
But after they reach final form, they will be permanently reiterable, and if you time them perfectly there will never be any extra class time for pesky questions.
As for the teaching assistant, remember what it was like when you were a T.A. These people are getting paid to attend your lectures! What do you get in return? Never give up on Step Five! For further advice, see The Prince concerning the way to maintain power over lesser princes.
TWO: Use your institutional status to generate as many volumes, works, and publications as possible (see steps 1-7, 9 & 10). Pursue endowed chairs with no teaching duties. Repeat until you are so successful that you need never work again.