Another huge factor is being able to avoid external stressors which are what really drain people and cause burnout I think, having bad co-workers or manager, health issues, family issues, etc. is a killer and will impact your focus drastically. Big difference between working long hours because you are having fun versus working long hours because a boss is breathing down your neck and you'll be fired if you don't finish something in a few weeks
Carmack is also in a favorable position where he's basically always been able to choose only projects he's passionate about for work, so he can't really see the perspective of somebody being forced to work on something pointless by their boss
my take from his comment was that even when you are too mentally drained to write code or something similarly demanding, you could still do stuff like meetings, responding to emails, getting feedback from customers, planning stuff you will code when mentally fresh, etc. So the critical thing is to make sure you can focus on valuable stuff when you are at your best and try to save the other stuff for later