Change company.
If the only progression for an engineer is to become a manager, change company to one that allows an engineer to continue growing, continue learning, and continue to earn more.
Some signs a company will force you to become a manager to progress:
1. Artificial ceilings: "We have Principal and Staff Engineers, but those are defined as having had impact outside the company so you cannot become one as your work only has impact internally" - effectively these titles are only offered to strategic hires and it's not attainable from inside the company
2. Managers paid more than the top engineers.
3. Title inflation as this stifles actual growth and learning and tends to limit overall earnings forcing you to look to change your career to find new challenges and earnings even though you want to be an IC and continue to do engineering.
Unless a company truly has a clear progression for ICs with learning, growth and earnings all factored in, and that the IC progression goes all the way to near the top of the company, and it's achievable within the company... then you're going to reach the point that you'll look at the manager career and think it's the only way forward. It isn't, and it's not even forward it's to the side and backwards a bit (you reset your career and start at the lowest level of a new track).
If you can't progress as an engineer and wish to... change company.
The ranges overlap: an early career engineer will definitely be paid less than an early career manager... but a top engineer should be able to earn more than the vast majority (if not all) of the managers.
A good manager is a productivity multiplier which is why the top companies spend an arm and leg training up their managers.
The real issue is that is much easier to manage a group of top engineers than it is to manage a group of engineers who think that they are top engineers.
Also, using salary to force engineers into becoming managers is a good recipe for losing good engineers. Either because they become managers or because they leave.
And because managers tend to be the ones proposing promotions or career upgrades, they reproduce this mindset by selection bias.
The point mentioned in some comment above about changing company if you feel forced to move to management has been proved by this comment. If you see this behaviour in management, no matter if you want to continue your IC career or move to management, run. Find a better place.
It has been incredibly freeing to work at GitLab where there is an engineering career path and no pressure to move into management. I don't think I'm a bad manager, but I don't enjoy it as much as engineering, and it's nice to just be able to do what I'm good at.
It's been over a decade since I've worked at a company with managers. However, it was common for the top programmers to make more money than their managers there.
Programming and managing are completely different jobs that accomplish different things for the organisation, but they are typically arranged in a top-down fashion, the manager has power over the programmer. A manager's job is to do the function of interacting with the wider organisation in order to determine the best way for the programmer to spend his time, in effect it's a research job, then he presents the programmer with the results of his research and they both agree that the most value can be added to the organisation by working on bug X today instead of feature Y. But what actually happens is the manager says "do this, because I said so, and if you don't I'll block your next raise". Or so-called engineering managers cherry-pick the most rewarding work for themselves and assign the unfulfilling work to subordinates as punishment. That's deeply dysfunctional but it's what happens when you have a group who wants to do real work, and another group who has plenty of time on their hands for full-time politicking.
Unless programmers have equal knowledge of and input into their managers salary as their manager does in their's, there's still that fundamental top-down structure.
I've heard Goog does a bit better with a bit more autonomy so people can gravitate towards good ideas, but have also heard plenty of downsides. Maybe a new way to structure employees could come about?
Keep the Peter principle in mind always and recognize when a promotion would actually “diminish your value to the organization” - that’s a great way to sell it so you’re not seen as just passing on the offer.