When discussing philosophy or moral frameworks, people often state that "moderation is a virtue" - epicureanism also lists moderation as a virtue! But for Epicurus, the POINT was pleasure. Virtue was not seen as an end in itself, but a virtuous life would guide you toward more pleasure.
The problem with moderation isn't actually the concept itself. Moderation allows us to maximize pleasure by indulging only to the point where a pleasure will not lead to greater harm. See: having a drink or maybe two at dinner, but not impairing myself to the point that I will make harmful decisions and feel badly the next day. It's a very useful tool!
The problem is with people's understanding of moderation - and some amount of cognitive dissonance.
What is moderation?
Merriam-Webster's primary definition of moderation is
a : avoiding extremes of behavior or expression : observing reasonable limits
b : CALM, TEMPERATE
When discussing moderation as a virtue, it is standard practice to use both this definition - the one warning of extremes - and another one at the same time, without really understanding why or even in fact that we're using a single word to mean two different things while promoting a single concept. This is very bad practice, and why it's important - especially when debating someone else, but also when you're working toward your own understanding of the world that you get your definitions down before you even start. You can use literally any definition you like, but you have to pin it down in order to understand the framework in which the discussion is taking place.
Crucially, in this case the second definition is not a commonly accepted definition of moderation, and is in fact incompatible with what we usually understand moderation to mean (the definition provided above). This is where the cognitive dissonance comes in.
The second is a definition encouraging abstinence.
Is abstinence moderate?
If moderation means a medium amount, and requires avoiding extremes and excesses, then it must necessarily mean avoiding an excess of caution. Abstinence is definitionally immoderate.
And yet people will encourage deprivation and asceticism by appealing to the virtue of morality.
This can be confusing, because it makes it seem like I'm suggesting that deprivation or abstinence from anything ever is always wrong or immoral. I was confronted once with someone who said that they'd never tried crystal meth before so did that make them immoderate?
And yes, of course it does. They are not a moderate crystal meth user. They are entirely abstinent. But that's not a moral failing. I have also never tried meth. For me, I consider it to be a moral good, because my assessment (the hedonic calculus if you will) is that trying meth even once is likely to lead to a net negative in the balance of pleasure and pain. I have no interest so I have nothing to gain. It has nothing to do with moderation - pleasure is the telos - the measuring stick by which I judge the goodness of this and any choice. Moderation is only a tool to get me to pleasure, and so even it should only be used in moderation.
The Moderation Paradox
If all things should be in moderation, that's an extreme of moderation. An immoderate amount of moderation.
Similarly, if one always avoids abstinence in favor of moderation, they are abstaining from abstinence.
This is just another reason to look to net pleasure instead, since too much moderation (or temperance for the same reason, or in fact any of the virtues) is intrinsically a violation of the virtues itself.
When trying to research this concept, and to see if anyone else has ever written about it (I'm sure they have but I can't find it because SEO has made google unusable), what I found instead was thousands of articles of people writing "Moderation is only good for Good things. Abstain from everything that is not Good according to my personal opinion."
Fuck those people.
Abstain from things that will cause you net harm. Take care of yourself, and make use of abstinence where necessary for you personally.
But different people are in different places and what requires abstinence will vary.
This kind of judgment from yourself or others is not going to help you on the path to taking better care of yourself, so let's just throw all those articles in the garbage. And Google too, while we're at it.