That's always difficult to answer for someone else. If it were ME, the next time he did it, I think his SIM card would mysteriously disappear from the phone, and the battery contacts would suddenly stop working because it's funny how that clear nail polish doesn't really conduct electricity too well, don'tchaknow.
Or I would look him square in the eyes and tell him "Husband, I have asked you multiple times to respect my wishes and my boundary and not text your girlfriend in front of me and the kids. This is not yet another in a series of times I'm going to ask you. It's the first in a series of ONE. Do it again, and you're not going to like what happens. I'm done with your disrespect."
And if he did it again, the next time he went out, I'd have all the locks changed and his sh&t would all be out in the front yard.