If you want to have a tenure track "professor" position focused on teaching in a top-tier university, you need to be a great researcher as teaching skills are not considered much -- you just get to decide to focus on teaching after you get tenure. Thankfully, many universities (even the prestigious ones) are now starting to hire more semi-permanent teaching-focused staff (and some even use the title professor for these). You do not get as much independence in such a position, especially if you want to make a class for more senior students, but it is a good middle ground. Or you can be a professor at a school that is not in the rat-race to be "top-tier research institution" - you still need to have some small research output (but that is actually an awesome way to introduce a couple of undergrads a year to research) and you get to focus on making awesome classes (of course, there is still the expectation that you have a PhD to apply for these positions, but at these places your teaching experience is actually taken seriously in the hiring process).
As to what to do during your PhD: find an advisor that is happy to have one or two students focused on teaching and outreach (they would like to have that because when applying for grants it makes it easier for them to explain how they have broader impact, pointing to your work).