I'll put this out there - not to judge, but to help anyone who may be going through a divorce with children involved.
IMO, ideally, each parent will teach their children to respect their ex. In spite of everything, that person is their parent. With divorce being an upheaval outside the child's control, this is the best thing we can do for them IMO. It's a rule of thumb - never speak ill of your ex in front of your children.
If a child is in the middle of a war between parents, he/she doesn't want to be there but was put there by the warring parties. Heck, the child didn't even ask to be born.
In writing this, I do know that there are truly some evil people out there and in this case, I would do everything possible to keep my children from anyone like that, even if that person was my ex. The problem is, we don't know what another person is capable of before they do it.