I’ve been in that situation a few times – when you go into a pub not realising that there are machines there and the old feelings well back … Most times I managed to resist the urge – by sitting so I am not in view (and if possible in hearing distance) of them.
My last few gambles were when, like you I thought – I can handle this, just a few pounds won’t hurt. But, of course it didn’t stop at a few pounds …
When I moved to a new city (to get away from the casinos I went to) I checked out the pubs that did not have machines and only went to them. Luckily they tended to sell better drinks as well! Now I very rarely encounter machines when I go out. Here in France, they are only in specially licenced “sports bars” which are signed as such and so easy to avoid. I hope you have a great Christmas (you will get it earlier than most of us?) And a brilliant gamble free 2020.