The way he "spoke" to you was awful. It's actually pretty disgusting. Whether or not he is reenacting something from childhood, there is no reasonable excuse.I am so sorry you had to endure that.
I can only echo what others have said. Do not play the text game. Keyboard brave he is, otherwise a chicken sh!t. If he texting from outside of the home and it pertains to what you need at the grocery store or what time ot pick up the kids, yes, answer. If he wants to text spew from another location, you can kindly text back that you can have that conversation when he gets home. And if he is brave enough to say to your face what he does on text (which I doubt) you can tell him you will not be disrespected and walk away.
Your first instinct was to validate his half-arsed text apology. Maybe I am stubborn, or took too many years of verbal abuse from my ex, I don't know, but I would have said "I did not appreciate the way you texted me and I will not tolerate it anymore"
It is easier for us to see like Job said. I also have faith you can break this cycle too.