> The problem is that I know how to work around these things
Well I'm sure you could come up with a few ways to work around your locking container but why isn't that also a problem? I think it comes down to the level of "activation energy" it requires, which may include breaking it open and also getting a new one.
In a similar way your digital block needs to have a high enough activation energy (both in getting around it and then turning it back on) that it effectively blocks you. It doesn't need to be impossible, it doesn't even really need to be that hard since we tend to be tempted with these things when feeling at a low energy (or we would be doing something else). As an example, I have the leechblock extension where turning it off would require uninstalling it or typing in something really long, I havent touched it in years.
Think of it as an aid to will power, you'll need higher obstacles the lower your wall of will power (a limited resource)
> Another issue is that sometimes sites have valuable information.
You should try blocking the feeds and recommendeds instead. Setup some regex rules, use ublock lists, get extensions which block the home page etc. But you shouldn't block them permanently, set just enough time to catch up / remind yourself that most of the content is useless then move on