Didn't want to read and run. Am so sorry you are going through this. Splitting up is hard anyway, but when your children seem to be getting hurt in the fallout it's even more heartbreaking. I really sympathise.
Keep reminding yourself that you are in this for the long term. By keeping the moral high ground and not stooping to your X's level, you will not only keep your self-respect but, in future years, once your DS has grown up, he will know who is the parent who behaved well and who behaved badly. Sometimes justice is a long time coming, but it still comes and not having anything to reproach yourself about is what keeps you going until it arrives.
A friend of mine had a teenage daughter who rebelled at 13 much to her father's delight. He took his daughter's side and joined in with her when she railed against her mother, saying her mum was selfish, stupid, etc. Of course, this was exactly what a self-obsessed, opinionated teenager wanted to hear so was very well received, and for a while she was very close to her dad and a really bad wedge was driven between her and her mother. However, fast forward a few years, during which the mother has never run down the father, and the teenager grows up. Now she has lost all respect for her dad because she realised that his sympathising with her was nothing to do with him caring for her and acting in her best interests but everything to do with him 'getting one over' on his ex (her mum). Sometimes it takes until a child is an adult for them to see the full picture, but unless they are seriously messed up before then they usually do eventually.
Your adult DS will remember the person who wiped his knee and wiped his tears when he fell over, the person who sacrificed a weekend with friends in order to take him to the park and have a picnic, the person who sat him down and had a long chat about something that was worrying him. He won't remember who bought him lots of plastic toys that were fantastic for a week but soon became relegated to the bottom of the pile.
My HV gave me an excellent piece of advice concerning my XP: While it's vital that children know it's ok to love the NRP and the resident parent should never run down the absent parent, that does not mean that you have to tell lies/omit the truth. It just needs to be phrased in an age-appropriate way that makes it clear that no responsibility for the behaviour is attached to the child and that whatever goes on between the adults is not something the child should worry about. Don't run down your X but don't cover up for him either.
For example, if your XP cancels a visit, and your DS was expecting the visit, tell your DS straight away that Daddy had to cancel. You don't need to say why or give the impression that it's a valid/invalid reason. That's for your XP to explain. If your XP tells lies about you, say "Daddy must be mistaken. The truth is.... Perhaps Daddy got the wrong end of the stick." You are setting the record straight without accusing XP of telling lies. Eventually your DS will learn to trust the opinion of the person he spends more time feeling comfortable with, which will be you.
Hopefully things will improve as the divorce proceeds. It's a horrible time for all involved and even decent people can behave like selfish idiots in the middle of one. Is it worth a chat with your X about how damaging it is for DS to hear him running you down and how important it is for ds that he knows it's ok to continue to love and have contact with both parents without fear of upsetting the other? After all, you're getting divorced because you can't stand each other, not DS! If emotions are running too high for that, perhaps you could phrase it better in a letter. Depending on your X, one tone may work better than another. Appealing to someone's better nature is more likely to achieve results in most cases than accusation and a demand to stop in most cases. But if your X was a bully even before the relationship ended, it could backfire. Only you know if it's an appropriate tactic or not.
Best of luck. I hope things settle down soon.