Not a direct answer for you, but a different approach.
Psychologically the carrot is better than the stick, meaning you'll keep fighting the lock-out mechanism, eventually resenting it and removing it.
Having an alert to remind you that you wanted to stop will be more pursuasive. (I have a "go to bed" alarm with a gentle, gradually increasing volume on my phone)
What's even better is tying a habit you want (eating, going to bed, etc) into another habit which already exists, but obviously, I don't know you well enough to suggest anything specific, but perhaps something else happens near those times you want to stop and that'll help?