Block him on everything apart from say...a burner phone. Leave that in a drawer and only check it occasionally. Dont respond to anything that isn't directly child related. And even then only things like confirming pick up and drop off times.
When possible, have a family member do pick ups and drop offs. If you have to do it, only meet in public places. Stay in your car if possible.
For example, say you have the child on week days and he does at at the weekend, I'd check the phone on maybe on the wed and thurs to see he isn't cancelling. And again before taking the kid out to him on the Saturday. That's it. Over the weekend I'd leave the sound on incase he texts with a child emergency.
Never check it after 7pm (if the kids not currently with him) as you'll only stress yourself our before sleeping if he's texting shit.
Before responding to anything,at the vvery least, count to ten. No matter how hurtful or goady he's being. Think 'does this need a reaction or is that just what he's trying to get?'.
Ideally, put the phone away in a drawer and go have a cuppa and watch an episode of your fave show or two. Dilute the feeling to knee jerk react.