You've been with your DH for 10 years, stepson is 11. So he wouldn't be able to remember a time when his dad and his mum were together. I presume his mum was the resident parent, which inevitably means that his primary relationship is with his mum.
"My husband and his ex went through a really nasty court case which started due to very serious allegations being made about his stepfather (think voyeurism). Social were involved and as soon as step son spoke to the social worker, he changed his story to say all kinds of nasty things about his dad which were untrue."
So, here's a scenario that is all too possible. Your stepson's mother did not want her husband to be found guilty, and decided to deflect attention on to her ex instead. She worked upon her son (who would have trusted his mother completely) and convinces her son that 'the bad man' was his dad and not his stepdad, that he's made the switch in his head to protect his dad, that she understands why he did that, but - sweetheart, you have to tell the truth! How will daddy get the help he needs if we pretend he doesn't need help?
This wasn't just a conversation, this would have been his whole environment, with every interaction reinforcing that it was daddy not stepdaddy who is a bad man. Right down to the implication that mummy wouldn't love him any more if he lied that it was stepdaddy who was the bad man.
It would be a very unusual 8/9 year old who would not crumble in the face of such gaslighting / coercion / desolation.
I think your best chance to get past this, to deal with the resentment you feel for this young child, is to consider that this young child was a victim of adults. He was a victim of his mother, who gaslit him into believing what she tutored him to accuse. He was a victim of the psychologist, who took everything at face value and is incompetent. He is a victim of every other adult involved who did not consider anything other than the fabrications.
Put your resentment where it deserves to be - with the adults, not the child.
"I couldn't ever imagine my own kids telling such awful lies about their father."
You're assuming he told awful lies knowing they were awful lies. You're ascribing malevolence to this child. If he believed it to be true, do you still see malevolence in his actions?