I'm 30yrs coding now. Many titles, many countries and many codebases. I've built software businesses, been a company director, and been an employee, big, small — you name it. I still love coding and do it every day out in the open, and I’m so over all the hype and BS of people in this industry thinking they are elite programmers.
Today I'm a Head of Product, in the product world, mentoring product managers, UX designers and engineers on what is essential in their actual work. I train them, I mentor them, and I grow them so that they gain more momentum. I designed and wrote the foundational codebase they use to start their products. I can jam on event-sourced systems and domain driven design with the best of them and do that every day.
It might sound exceptional to industry norms, but this is what most ageing programmers should be doing to help their companies grow up and scale out.
Cant teach? I'd say you are not learning hard enough then because teaching is learning!