It surely will be hard to self exclude from gambling sites if one is so obsessed but it's not impossible too. As you said one trick is by locking all the funds somewhere making your pocket empty. Other thing one can do is by deviating mind from gambling to other entertaining things or sports, games(PC or mobile). So to do this one need strong will power and self confident. It may seem hard in the beginning but one thing is true "Time heal everything."
You must occupy yourself with something else to keep yourself away from gambling. Otherwise you can never avoid gambling if you are vulnerable to gambling. In this case, keeping all your money locked somewhere can also be a good solution. But I think the most useful strategy is to keep yourself so busy with something that you automatically forget about gambling. And if your subject is a financial subject then it will work better because we are very weak with money
It can be very difficult for you to exclude yourself from gambling if you don't have a job or something doing that always take your time.
There are some kind of jobs that will not give us the liberty to have time to gamble looking at how tedious it could be trying to make plans for the next work day. Maybe you might have time to spend during the weekends but I bet, that's not enough for you to enjoy gambling or have sufficient time to make predictions before betting. People that are always less busy might not have the obstruction that can relinquish them from gambling since they have all the time to always bet.
What you said is the absolute truth, like it's often said that the idle mind is the devil's workshop, idleness is the number one thing that drives most people into doing things that ordinarily, they wouldn't.
I remember way back when I was working for a company, and since it was an industrial company, the work was so tedious that the majority of us never had time for anything else, not even visit friends or friends visit any of us, because we were always at work, sometimes for me than 24 hours, and sometimes, all through the weekend as well.
Now, assuming I was into gambling then, there was never a way I would have time to even enjoy it, let alone getting addicted to the extend that I would want to exclude myself at some point.
So, this is actually the trick, an addicted gambler who wants to quick should simply get very busy with other activities, something that keeps their minds away from gambling all day and all through the week, with time, he or she will discover that he's no longer crazy about gambling like he or she used to.