I think the key to succeeding with habits is leaving oneself enough room for failure that it becomes easy to avoid the real failure, which is to drop the habit.
Don’t punish yourself for failure, if you want to keep the habit long term. You’ll feel strong in the moment, like you’re being tough on yourself, and that’s not a bad thing. There’s a place for that. Just not in setting up the habit itself.
Give yourself a generous, forgiving framework to act within. Most days, you’ll do better than the bare minimum you’ve set for yourself, and that is exciting. Some days, you’ll do way, way better than that bare minimum, when the inspiration to do so is there. Those days will be pretty rare.
And then some days, whether because of schedule or stress or health or just mood, you’ll only do the bare minimum.
On those bare minimum days, there will not be much progress, but there still will be a little, which counts for something, since all the little bits add up over time.
But far more importantly, those bare minimum days precede more days of practicing that habit. Without the generous framework, the “bare minimum” days would feel instead like “failure” days, and no one likes to feel like a failure.
There are only so many times a habit can be failed before a person gives up on it. Psychologically, that just seems to be the reality, at least for most of us. But having a low bar means it is easy to avoid failure, which in the long run will pay dividends.