I'm a stepmother to two children and I have little to no relationship with the ex wife. I met my husband years after they separated but she still "hates" me (according to my SC). My SC and I have a good relationship when they're at my house - I have no real ideal of what they think of me when they are in "Mum Mode", but I can make an educated guess.
Honestly, after many, many years of trying to push back on what we thought was wrong, my husband and I have accepted that which we do not have the power to control and "given in" to make things easier and less conflict-heavy for all of our children.
Children adore their mothers. If you are at odds with an ex partner and mother of your children, give up the notion that you can or should try to change this "for the sake of the children" - you are only creating a battle ground in which the children must live. Let the ex say what she says, don't give it any airtime in front of your children (for example, don't say "you could have an ice cream, but your mum has emailed me to say no more ice creams at my house"). Just say fuck all and refocus your attention elsewhere.
Children who are taught by their primary care giver to dislike and diminish the non-resident parent (NRP) cannot be retrained into love and acceptance the rest of the time. You just won't manage it. The thoughts and wishes of the RP are too strong and will almost always succeed. There has been much research done on this.
Children will instead develop coping mechanisms to "survive" the battleground. They will attempt to curry favour with both parents and blame themselves when this results in more conflict. They will worry about what is happening with the other parent when they are away. They will learn to hold two versions of "truth" in their minds simultaneously, which is disordered thinking. They do all of this because they just want their little world to make sense. You can halve this problem for them by not engaging at all.
You and your ex are both parents to this girl and you are both equally responsible for her. You cannot stop your ex from saying anything she pleases, but you can stop yourself from engaging - sometimes this can feel an awful lot like "giving in" to your ex or letting her "get away with" saying awful things. It can also feel imperative that you set the record straight for your daughter, as you want her to grow up feeling loved and cared for by both parents (and it is a loving and caring thing that we do when we raise our children to think critically and be truthful) BUT, it's really better if you just let the things be said. When your daughter repeats them to you, focus on her feelings without telling her how to feel or letting her know how it makes you feel.
In essence - let your ex call her shots, to your daughter, as she sees them... and do nothing about it. It does not diminish you, it empowers you. It is freeing. You do not have to accept the things she says, you just have to pretend it's reasonable for the sake of your daughter.
Once, my step son said to me "Daddy is a bad man and I know this because Mummy tells me everything. But Daddy never has anything to say to me about Mummy, which is how I know Mummy is very important and kind."
I took this to mean we're doing a good job of reducing conflict in his world.
Apologies to anyone that feels hurt by anything I have said - it is not my intention to upset others, I'm just sharing what works for us in raising my step children.