I think it's time you lawyered up, frankly. He's still lot taking you seriously, and we now know there are debts, probably some very serious ones.
Get a credit report done on both you and him.
I'm trying to remember back to before we called him Twunt or cockwomble, etc, back when you at least were calling him D-something. Anyway, can't remember if he was H or P but even if the latter, it is possible for him to drag you down into debt - depends on how linked your finances were. At any rate, this sounds hugely unstable, financially, so do whatever you can ASAp to lock things in place. I'd also really give ponder to garnishing the entirety of joint savings (or whatever he had in your account, I think it was?...). I know normally that's not "fair", but this isn't normal.
You're lucky in that he's texted you proof that he gambles. This, combined with the evidence of frequency, sneakiness, gaslighting, etc, add up to a most unpleasant picture that Family Court would love to see. Finally, just to crank up the hysteria a notch (sorry) - with whom does he gambles and where? Online? Casino? Mates' house? Illegal gambling den? Depending on the kind of people he owes, life could get very unsafe, and you're well within your rights not to let the children alone with him. Gblers aren't the gentlemen we know from the film's and even our own parents' recollections from the 50s, 60s, 70s - these fuckers will not scruple to leave women and children out of their enforcement techniques.