I wrote a script that set an X countdown time to shutdown. The script gave a warning at five minutes and 1 minute until shutdown. Once I set it I could not stop it. It would load automatically at boot time. It worked rather well until I decided to stop using it. I don't have a solution for giving up. :)
Yeah I don't think any tool can fully solve this – it's ultimately a willpower thing.
the tool's job is to add friction, not to be unbreakable. Even if you bypass it sometimes, if it stops you from staying up late a few more times per month, that's a win