Sotto is correct. Your xh isn't going to change and he's going to continue to bully you until you wave the white flag and tell him to take the kids, etc. You have the power to change the dynamics of communication w/your xh. Your drama continues because you feed his ego w/replying to his texts, etc. and constantly explaining things to him. I would send him a very short, but to the point note and say "xh, I am holding my own." and Leave it at that.
In the future, I wouldn't have any more written communications w/him unless it was an emergency. I would only communicate w/him via the phone or in person. There is too much going on w/the drama in your situation and the when you are responding to his written comments, etc., you don't know if he's going to use that info for his benefit. In my opinion, he's a coward for hiding behind a pen and a computer.
You do have a choice in all of this...keep up the drama triangle or step off the crazy train and stop giving him enough ammunition to attack you each and every time you have any type of communication.
I pray that things improve...but you've got to keep your responses short and sweet and to the point.