I have been at it for 20 years now and have started to feel my time is up as well
As a lot of comments here highlights, the issue is not so much the tech but the politics, constant perf reviews, re-orgs, nonsense BS that is pushed top-down. This industry is taking a toll on you.
My advice for anyone reading this that is starting your career: Live simply and save a lot.
When I started my career I thought I would love doing this forever. I would never imagine I would get burned out in the long run. I would never imagine I would think about retiring early because tech was so fun to me.
The reality is that money and savings give you optionality. It allows you to work without worrying day to day. You never know when the next wave of AI or BS is going to hit. That's when having that optionality is really important.
I have seen so many of my peers making very high tech income but also living the American opulent life, spending everything they make to buy multi-million dollar houses in the bay area to impress their friends. Today they have no choice than continue working for another 30 years. Today I can have a simple life and retire almost anywhere in the world.
Decide what is important to you. I guarante that buying the multi-million dollar home is not worth the extra 30 years of grinding.