What people call a burnout is a result of what we call psychological stress or a burden out of constant frustration about the particulars of the task at hand.
We have never been evolved to live immersed in a constantly changing environment, where almost nothing that worked well yesterday will work day after tomorrow. The environment we have evolved in is stable, even in the social aspects (of traditionalist societies).
Not just that, but we are not accustomed to deal with an endless series of frequent small “fails” or “errors”, which cause a certain biochemical reaction (a surge in concentration of so-called stress hormones) and requires a recovery and a restart. Imagine losing tens of tiny boxing matches in a day.
The process of evolution “gave” us these stress hormones because it turns out that when facing a sudden “failure”, anger, frustration and self-blame are useful “tools” (one has to recover from a n emotional breakdown, slow-down, relax, introspect and ruminate about the situation and its causes) provided these “failures” are rare events – definitely not several such events per day.
Having several “failures” within a presumably stable environment is a signal of some neurological disorder and the body “knows” this and has its “priming and defense mechanisms”, however ineffective.
It is may be OK to cope with such constant stress, provided there is some distant reward - a delayed gratification but when there is just an average paycheck (if any!) the motivation is quickly going to zero and a vivid memory associated with a strong emotion of aversion is being formed (which is a defense mechanism).
Everything which worked yesterday stops working for arbitrary reasons (mostly because some degenerates upstream have changed something) and everything which has been written becomes outdated in six months.
Not just that, but the stuff we work with (libraries, tools, documentation) is of the lowest junk-food (or street drugs) quality, which no one really likes to deal with. This is what we have Instead of craftsmanship approaching an art, as it used to be in 70s and 80s and early 90s (before the “C++ and Javascript everywhere” paradigmatic disaster).
All this, of course, has a well-understood causality of an imperative coding with unstable crappy, poorly “designed” interfaces and even the plain idiocy of stateful protocols.
Unqualified and uneducated (about the underlying principles) Chuds write very quickly (without doing any research or studying the relevant literature) a crappy imperative code to seek attention and to show off (in the case of open-source).
In contrast, what has been written in 80s and 90s (LISP, ML, even good C) remains stable and “just works”, precisely because so much time has been spent on studying, reading, thinking, prototyping and testing before coding.
Almost every classic book in the boomer’s C.A.R Hoare Series teaches this classic, mathematical and even scientific approach.
What is to be done
This high-frequency small “fails” rat-race is the main cause of the psychological burnout, which is the result (very few, however, interpret it this way) of body’s defense mechanisms at work.
Burnout drastically decreases when you actually ship partially-completed things (the “Always Be Compiled” principle) on a regular basis (the “something every day” mantra). More generally, one at least has to write everything down (commit and push into a repo), so nothing would be lost.
Dopamine and other rewards has to be regularly received to keep motivation (which is what keeps us going, even in the face of constant obstacles, frustration or even pain). Motivation is everything, and it is, indeed, just /dopamine (which has been “proven” in clinical settings).
So, partial, intermediate but “well-defined” (and well-understood) results are necessary. Just like a few more kilometers after a short stop for a runner.
Long, gradual process, like construction, but with each iteration being well-defined and ends up in a well-understood, stable state, which is, again, the ABC principle and the core principle behind Scrum. Scrum adds another principle of a quickest, tight feedback loops and necessary backtracking and corrections.
Everything is a form of a backtracking search process after all.
Having a “yay! all tests passed” and “it compiles without a warning” is enough to protect and reinforce motivation.
Partial results can be just adding a new slot to an algebraic type and the code (which “magically” won’t break the exciting code, but all the relevant pattern matching expressions will be flagged with “errors”).
Burnout primarily comes from useless, unnecessary burden, distractions, restarts, rework and rewriting due to a technical debt (poor and uninformed desing diocesans) and from never seeing the end of projects.
Uncertainty is demotivating and exhausting, and even partial delivering (which does not break anything, compiles without any warnings and passes all tests) is a good way to remove a lot of it.
Well-researched and well-written (optimal) code is “eternal” and will be reused.
Automate everything
Use all the tools available, beginning with a strong static typing and focus on well-designed high-level interfaces and algebraic types (and related small isolated, orthigonal to each other modules) as the basic building blocks.