I don't know if I can give you any useful advice but I can relate my own experience (40+ years programming) and how I have learned to avoid burnout, after going through it a couple of times.

It depends on the project and the organization, but a lot of programming can feel Sisyphean -- you just push the same boulder up the hill and it rolls back down. Requirements change, legacy code requires maintenance, it starts to look old and boring and you feel like you will never get to do something fun and interesting. And the job often feels thankless -- management, customers, users don't know or appreciate the work you put in, they just keep coming up with more demands.

When I start to think those thoughts and feel frustrated I remind myself that I get paid well for doing work few people can do, and I have to find satisfaction in myself for doing a good job. I make the effort to get to know other parts of the business, people outside of IT, so I can see the effects of my work and maybe find ways to improve things no one told me about. Sometimes the end users tell me how something I did made their job easier, sometimes management tells me how I saved money or improved the bottom line. So try engaging with the rest of the organization. I think too many programmers stay in their cubicle (or in our case, our home office -- I work remotely too) and feel alienated from the company and end users, which can make the job feel less satisfying and disconnected.

My parents had what I thought of as boring union jobs. They did their 9 to 5, came home and never talked about or stressed over work. It was the same predictable thing day after day. They didn't expect their job to provide personal growth, or to match up with their dreams, or even to enjoy their jobs. It was a way to pay the bills, to raise kids, to save up for things they did want to do. They might have a good day, make friends at work, have a laugh, but their happiness didn't derive from the job and they didn't expect it to. I used to think my parents had failed because they didn't "follow their dreams" or strive for more "fulfilling" jobs, but as I got older I started to think they got it right. Now I don't expect my work to make me happy, or think I need to enjoy every minute of it. I get paid well and I don't have to break my back like a lot of people do for much less money.

I think people imagine a more enjoyable and fulfilling career and then measure what they actually do against that imaginary path not taken. But when you talk to people you find out almost everyone feels the same way. You can find people online bragging about changing the world and living their dream, and maybe some of them do, but mostly I think it's either inexperience or delusion, or fishing for likes on social media. Today's hyper-motivated young programmer still feeling the thrill of getting some cool code to work will run out of energy and realize the software business has exploited that exuberance and optimism. Douglas Coupland (I think) once quipped that the software business was built on the labor of unsocialized young men. I remember when I looked forward to working 16 hours a day for pizza and beer. Then I figured out I was just getting used, I didn't have the maturity and I mistook a few perks and a fake "fun" workplace for living my dream. Once I had a family the job seemed more necessary but far less important to my personal sense of self and well-being. Now I just want the paycheck for a reasonable number of hours.

Over time I came to expect less from my work in terms of kudos or happiness or self-fulfillment. I didn't expect it, but letting go of those expectations made me feel more satisfied with the work -- I could deal with it as a craft I had mastered and take satisfaction in doing a good job, even if no one else recognized that. The book Zen And The Art Of Motorcycle Maintenance helped me rethink my priorities and expectations, and reframe "quality" and "satisfaction" and "enjoyment" as things I could control rather than things that might happen to me (or not).

Good luck either coming to terms with the job situation, or finding a different path that suits you.