I've been doing this for over 20 years and unfortunately what you describe is pretty much par for the course in this industry. What is a bit unusual in your situation is how early in your career you are feeling "crushed" by it. It usually takes years, if not a decade or more, for young developers to "burnout."

Your job as a developer will forever be triage and tourniquets. Take a look around your development department(s) and see how many people you find over 40 years old. Chances are there is disproportionately less than those in the 20's and 30's, if you find any at all. Have you ever wondered where all these "veteran developers" have gone? Based on my experience, anyone who has spent any significant time in software development has either moved into a management role or they have outright left the industry.

You are probably feeling pretty discouraged at this point and questioning the next 45+ years of your career. If you have any other marketable skills, and someone is willing to pay you for them, I would honestly recommend getting out as soon as possible. If you do not have said skills, start thinking about what you would rather be doing and acquire the required skills to make a transition. In the interim, do everything in your control to limit your frustration. The biggest action item here is to keep the number of hours you spend smashing your face on your keyboard to a minimum. This usually means working on software for about 8 hours per day, 5 days per week and no more. Spend the rest of your time doing anything else, preferably not related to technology. If you cannot complete your employers tasks within that Mon - Fri, 8 a.m. - 5 p.m. schedule, you need to reevaluate the way you work.

Some things to consider when looking for what to change:

1) Is your application using a well established framework and design patterns? If not, this is probably the source of a lot of your frustration. Most of the day-to-day issues related to development have already been solved by someone smarter than you. A well designed framework will lead to good application flow and an overall simpler code base. Don't reinvent the wheel!

2) Can any part of your development process, like integration and testing, be automated? Automating even simple tasks can add up to significant time savings over the coarse of a development cycle.

3) Break your application down into small, isolated and well defined parts to make the larger overall application easier to understand and work on. I like to follow many of the Unix design principals laid out by Doug McIlroy, Eric Raymond and many others to help me accomplish this. Ex: Do one thing and do it well.

4) Isolate the hard to understand or debug legacy garbage from the rest of the application. This will help prevent the propagation of less than desirable workflows to newer/cleaner portions of the application.

5) Refactor and replace some of the less than desirable workflows moving forward. You maybe able to make some of these changes in-place, but if you cannot swap out parts of your app due to complexity or other reasons, look into replacing the functionality in question with smaller, less complex parts for new portions of your app.

If you find yourself working for a company that wants you to put in as many hours as it takes, doesn't see the value in making any of the above changes or is on some autistic journey to create their own in-house framework or design patterns, then it is time to find a new job. After working for a number of these companies over the years, I can tell you that there is nothing you will be able to do or say to convince these employers to help you save your sanity. They all seem to have this "well if you can't do it we will find someone who can" attitude that will ultimately lead to a newer, younger candidate they can use up and burnout.

Invest some of the time you have allocated to not working in your personal relationships and self care. This includes 8 hours of sleep, exercise, eating well, going out with friends and spending time with family. Taking care of things like this will help you feel better about your overall quality of life and help keep work from overwhelming you. Remember, just about everyone in this industry has experienced similar feelings of despair. There is much more to life than work and your worth as an individual is in no way related to what you do to earn money.