Scott Hahn has an absolutely brilliant analysis of the “trap” To do my best to paraphase professor Hahn he states that if Jesus says that they should stone her according to the law, the Pharisees catch him imposing a death sentence which can only be done by the Romans and thus Jesus is guilty of insurrection. On the other hand, if Jesus says she doesnt neeed to be stoned the Pharisees catch him going against the Old Testament law and thus could never be the Messiah. Jesus’s brilliant answer puts the Pharisees in an untenable position because they could never say that Jesus told them to stone her, because Jesus had such an incredibly low opinion of the Pharisees (calling them vipers, etc.) the Romans would not have accepted that he considered them “without sin.” So much more that I am missing would highly reccommend reading Hahn’s work as there are so many subtleties here that fly right over my head.