I do believe it is a muscle, but it doesn't explain how people can make extreme choices. Going from say, binge drinking and unhealthy eating to no drinking and perfectly healthy eating the next day. If you don't have a template for healthy eating, of course, that is practically never going to happen, but if you have some general idea of healthy eating and have practiced it before it becomes very easy to change over. (How did someone practice healthy eating before, bit of a chicken and egg?)

I would argue that you have done that trickery of your mind I mentioned. Self awareness, recognition of meta-thought patterns, alignment of other systems in your brain with your "ego" or consciousness. Those tools let you make choices that are theoretically not possible if your will is entirely depleted and you are subject to the whims of lower level systems. It is in this area where radicalizing life style, having big goals and ideas that excite you and, say, require physical health, or really learning deeply on some topic, can pull you through. You have tricked or overridden those underlying systems that would push you towards a lazy or consumptive habit towards a more generative habit. The big goal may require high degree of physical health, or deep knowledge on some topic. It really helps to be able to achieve it in small, observable chunks (getting a little fitter every day/week, learning a little more, etc.).

There is clearly something to the whole ego depletion concept, it is, at least, a helpful mental model to observe the act of becoming mentally tired and acknowledge it. I really do believe in decision fatigue. I have tried to (radically) cut decisions out of my life (what to wear, etc.). So that I can make decisions about the most important things, my work goals, family goals, big picture stuff. Despite ego depletion being a tricky mental model, it is obvious everyone gets tired. Most good developers, even after years of consistent hacking will still only have 3-6 deep hours in them on any given day. That's it. Only (rather extreme, IMO) outliers can, say, code intense for 12 hours with the same quality of the first few. Most of us require sleep, mental digestion, and problems get solved somewhere in the depths of our mind outside of the view of our consciousness. Then we return and the problem is solved in the shower or in flashes of "insight" (which would just be whatever system in your brain finally getting the message through to your consciousness... the pieces finally got connected).

How does this happen? We have no will, yet in our sleep our brain is clearing out memories and getting our systems tuned up for the next go. Is this "actual" thinking? Or is it really the equivalent of compacting a database so that the higher level systems can now just see more clearly? It is super complex. There are so many questions about the way deep thinking and problem solving works, how we create things that we set out to create, overcoming obstacles. Ego depletion is like a local maxima or tactical part of the bigger picture of getting what you want and building / solving.

So what is will power? Is there ego that we deplete? I don't know, but I know straight up higher level conscious thinking about every decision to achieve a desired outcome are practically impossible for most people. That means other systems and processes work as the primary agents of change in our lives, and willpower is at best a passenger giving you advice and helping you out once in a while.