Yes, it's possible. Give yourself time to recover, as long as it takes, and time after that to rediscover the joy. That may mean, for a little while, grinding away at some kind of unsatisfying but low-stress job while doing your own little "joy" projects in your spare time, or training in a new platform/language just to remind yourself of the fun of starting again from scratch.
Nobody says you have to be a manager, or take a permanent role. This time is a gift - an opportunity to sidestep whatever "career track" you thought you were expected to follow and instead figure out your own values and priorities - it sounds like you've already gone along way towards that, at least you know what you don't want.
We are uniquely blessed in this business with such a wide range of opportunities and modes of working. The rise of remote work has only made that better. Be kind to yourself, and remember that despite whatever kind of imposter syndrome may be lurking in the back of your head, you most likely have an extremely valuable skill set that continues to be in demand around the world.
Also, like me, you may have to accept that you are getting older and can't rely quite so much on having that super-sharp working memory to hold an entire codebase in your head and stay focused for hours on end. A lot of my burnout came from putting unreasonable expectations on myself. Once I started taking a lot more notes, drawing a lot more diagrams, and asking a lot more questions I actually found I became more efficient than when I was relying on mental capacity alone. And it became much easier to take breaks and tolerate interruptions.
I am starting to realize that if I don't write things down, then they won't stick around.
I've procrastinated writing things down because it would take more time and effort than its worth -- If I just think a bit longer and harder, then the solution will come, and I won't have to waste all the time it takes to write everything out.
Recently, I have noticed this usually fails, and when I end up writing things down, then I come to the realization that actually writing things down would have saved more time in the first place. It was merely my assumptions, laziness, and arrogance that cost me more time.
This worked for me. I had to first admit that I wasn't okay, then I had to change the expectations I had of myself.
I had to get comfortable enforcing boundaries (i.e. say no), which was made easier by changing jobs (because I had an opportunity to set expectations with my employer). I also had to gain some better soft skills to make 'no' sound more reasonable, which was a challenge at first, but has served well since.
The other huge factor that made it possible for me was financial stability. It is much easier to set boundaries when I have money to survive an unplanned job hunt.
Nobody says you have to be a manager, or take a permanent role. This time is a gift - an opportunity to sidestep whatever "career track" you thought you were expected to follow and instead figure out your own values and priorities - it sounds like you've already gone along way towards that, at least you know what you don't want.
We are uniquely blessed in this business with such a wide range of opportunities and modes of working. The rise of remote work has only made that better. Be kind to yourself, and remember that despite whatever kind of imposter syndrome may be lurking in the back of your head, you most likely have an extremely valuable skill set that continues to be in demand around the world.