There are many different paths, what is important is you stand out on your path. You need to be stand out great to earn any more with 30 years experience as you do with 10 (inflation adjusted).

Someone else in your company on a path probably means you cannot take it (unless they are almost ready to retire, but often nobody actually takes over when someone retires), so be careful to chart your own unique path. With management a middle manager of an assembly line isn't that much different from a middle manager of a software project.

You can teach others. This is the person that decides we need to adopt a new language and figures out how to do that. You may soon find someone else is better than you at the language, but that is good because you are already working on a change culture from within so a minority doesn't feel excluded. This is a people job, you need just enough technical skill to be trusted to lead as an insider (managers are always a but outside and untrusted, while architects are too ivory tower)

The person who is in touch with the customer and figuring out what could be produced. They never write production code, just a prototype that shows things work between crashes. Maybe 5% ever gets to a real customer, but that 5% is important enough to keep them around. (Read you better have a lot of ideas, and not care that most don't get funded)

The non-manager recruiter. This person is at all the university job fairs. When they go to a technical conference you can be sure HR will get a dozen resumes in a few weeks. They know how to talk to technical people and get them excited.

The technical/manager compromise. This is the person who looks at all the technical dept and figures out what is worth investing money to fix vs just a "in a perfect world with unlimited money, but short of that there is no point. You will also be looked at when schedules and work are not lining up (with Agile this is different, but the concept exists) and figure out if/where adding people is useful. This person provides the technical input to the management decisions.

The best programmer in the company in some important/useful way. You take on the hardest programing tasks (the two hard problems in computer science: cache invalidation, naming things, and off by one errors) in the company and get them right every time.

The ISO representative: You are important to the relevant industry standards committee. ISO rules may not give you a vote, but when you object to something half of the voters switch to no.

If you have any speaking skills at all your are a regular speaker in technical conferences.

Note that with all of the above who you know is as important as what you know. They are on the same level, since you need to know enough that someone else doesn't call you out (though you can get by for 5-10 years on just who you know eventually management will change enough that you are caught). However if you don't know the right people you are back to one of the good people we have instead of the best person we have. The right people are often other technical people who then tell their manager as opposed to the managers directly. (in the best companies you are rewarded for making this two way - so tell your managers who their best junior people are)

Last, do you really want this? A lot of people are happy advancing to 10 years of experience, and then reaching their peak. They can lead their small team of engineers and go home at night. They don't spend weeks away from their family at conferences. (one a year is good, but that is enough)