My W does the exact same thing with the texting. It drives me crazy. What I can tell you is that your H will continue to behave this way regardless of what you do. He is completely insensitive to how it makes you feel.
This is emotionally abusive behavior that will wear you down over time. Personally, if I had to do it over again, i would just simply tell my W how rude and inappropriate the behavior is and have walked away whenever she does it. Maybe somebody can chime in with how to set an appropriate boundary.