Eventually the kids figure it out. One parent demeaning the other always comes back to bite 'em in the ass.... Talk to your lawyer about her harassment, see if there's anything that can be done.
From where I sit, your children have one true parent: you. If they hate you for setting boundaries and consequences, you are doing it right. Be the one true parent you are. And remember, spew coats are useful with kids, too
You are doing fine. Don't second guess yourself. Your instincts and actions are right on the money.
Oh, and...Delete All Texts from her. Before reading them!
Gardener
"My soul, be satisfied with flowers, With fruit, with weeds even; but gather them In the one garden you may call your own." Cyrano deBergerac