If OT law as given to civil society is truly God's law that hasn't been abrogated, we need to get to stoning lots of people.
As you know, the laws of the Torah were given for guidance and structure to the Israelites to live by. Pagan gentile nations had their own sets of codes to live by. So the Mosaic laws didn't apply to everyone.
I believe when Jesus said
you without sin cast the first stone, he wasn't canceling the law they had in place for the crimes they perceived the woman had committed. He was just saying everyone should clean up their own house before judging someone else (e.g. those men shouldn't be hypocrites when interpreting the law). Jesus followed the law and, at times, he called them on misrepresenting the spirit of the law (healing on the sabbath, etc.).
Had the accused woman been tried in front of the Sanhedrin in a proper court setting, with witnesses and testimony, he would have been ok with a guilty verdict. It was a teaching moment where the lesson was don't be quick to judge others when you are also breaking the law in some fashion. And also people who sin can be redeemed if they repent.
His position, IMO, was that the law was perfect and could be followed if people would love God and one another (the two greatest commandments). In doing so, people would naturally produce good fruit, which is what separated those who inherited God's kingdom from those on the outside looking in. So the accused woman could repent and be forgiven and turn from her life of sin. That is what Jesus wanted and it would conform to the spirit of the law... that is repent and turn from sin.