If the only opportunities for advancement in your organisation beyond "senior developer" require a move into mgmt or team leadership, that will work against the stability of your teams. Seriously consider hands-on dev career paths with equivalent status and rewards.
I see no real reason why a developer can't reach CTO-level status (and pay) within an organisation, while continuing to work where they offer the most value: mentoring and setting an example for teams.
If you believe promoting them into management roles is a way to retain your best developers... well, you haven't retained your best developers, have you?

@jasongorman Peter Principle at its finest.

Also it's the reason why I went out on my own in 2005.

@thirstybear For a heck of a lot of developers, freelancing is often the only option to continue working hands-on and get paid what senior mgmt do.
@jasongorman for the developer to negotiate a CTO-equivalent pay deal, they need to understand and communicate their value to the business which means having at least as good an understanding of how the business operates as they would in any of the "management" positions they're trying not to end up in.
@jasongorman nobody in the C suite is going to say "hey, we noticed you're worth 3x as much as we're paying you - here, have a pay rise" (unless a competitor is offering 4x as much....)
@dan In some major software companies like Apple and Google, a Distinguished or Principal Engineer can get paid > $1M a year.
@dan A bank or a supermarket chain is every bit as reliant on these skills as Apple and Google, for example.
@jasongorman going to go out on a limb her and suggest that in a bank or a retail chain the programmer's job is to take the top card off the backlog, and the "product owner" is the one who decided to put the card there in the first place.

Ours not to reason why, etc etc
@dan That's often true today. But as smaller, nimbler competitors start taking market share, it might not be true forever. e.g., a major car manufacturer I've done training are spinning off a chunk of development because their legacy mindset was working against them (unions, pay grades, command-and-control etc). I'm seeing more businesses realise "We're not built to succeed at this" and finding ways to restructure so that development is done in orgs that work more like tech start-ups.
@dan And pay and career paths very much a part of it.
@jasongorman yeah, though the reverse can happen too. Company gets bigger, decides it needs a "product org" that sets direction,with the side effect that it keeps developers away from customers
@dan How might we hope to write software that runs a business we don't understand?
@jasongorman Pretty sure Fred Brooks talked about this in relation to IBMs organisation structure (esp. 'fellowship') in the Mythical Man Month
@harefeet For sure, we've learned little in the last 50 years.
@jasongorman Absolutley this. I’ve left a number of roles where there was no opportunity to advance within the organisation in a purely technical role. That was a loss to many of those orgs, but even when I handed in my notice they had no mechanisms that would have enabled me to stay.
@jasongorman This is the right thing for an organization to do, but I wouldn't expect it to make a lot of difference when it comes to retaining the best developers. For a lot of developers, the challenge of doing the development is the thing. Their passion is software development. Mentoring is rewarding, but it isn't the same thing as building something new. Life is not just about money and prestige.... Says the poor guy