He is very smart but had a difficult upbringing. I don't want to play armchair psychologist, but maybe this will help to understand it, or help in case others here find themselves in a similar situation and may want to consider treatment.
https://www.promisesbehavioralhealth.com/addiction-recovery-blog/stages-of-compulsive-gambling/
Here are some excerpts:
Action Compulsive Gambler Profile:
Generally male, the action compulsive gambler possesses an I.Q. over 120, is controlling, manipulative and domineering and has a big ego. He is also confident, assertive, energetic and very persuasive, yet with a low self-esteem.
... Games of choice are typically those of skill
...The numbing or narcotic-like effect ... acts as a kind of medication to the action compulsive gambler. But it doesn’t stop the progression of compulsive gambling.
... Gambling to cover pain – Since gambling is the only activity that makes the action compulsive gambler feel better – he thinks – he continues gambling in order to cover up the increasing pain that he feels.
Like I said before, I personally don't think John is a compulsive gambler, but he is complicated and shares many of the traits they describe. I think his best solution would be to never bet a single penny again. Ever. If somebody goads him into betting, he needs to say "I can't do that. It's hurt me and my life. I don't want to be ruined."
If that means quitting pool, so be it.