This book, originally published in 1969, explains that people in organizations tend to rise to the level of their incompetence, then stay there.
If you’re an excellent junior developer, you’ll be promoted to mid-level, then senior.
If you’re an excellent senior developer, management will pressure you to becomea team lead, and then a manager.
Maybe you’ll be an excellent manager, or maybe you’ll suck.
If you suck, you may not get promoted, so you will have risen to your level of incompetence.
I’ve been a freelance software developer for over 35 years.
Rather than becoming a mediocre manager, I’ve remained a developer, expanding to architect, but staying out of management.
This gets me some funny looks sometimes, from people who wonder why I haven’t “moved up”.
On the other hand, tech leads are often happy and relieved to find me on their teams, because I can work an individual contributor, but I have a wide and deep perspective, and I can manage myself.
So my advice for becoming an unstressed developer (which I can truly say I am) is to continue to learn and grow, but keep your offical job roles below your level of incompetence.
To make sure you’re challenged and keep learning, take on extremely challenging side-projects, which you choose and manage yourself. That way, you grow to meet these challenges, but nobody yells at you if you screw up and have to take some time to clean up the mess.
You can experiment with whatever technologies and frameworks you want, without having to wait for managers to let you play with the cool stuff.