Most translations today say that John 7:53-8:11 is almost certainly not a part of the original gospel of John but represents a later addition to the text. While there are specifics that may have never happened the primary truths in this story are still present elsewhere in scripture.
"Everyone went to his home. But Jesus went to the Mount of Olives. Early in the morning He came again into the temple, and all the people were coming to Him; and He sat down and began to teach them. The scribes and the Pharisees brought a woman caught in adultery, and having set her in the center of the court, they said to Him, “Teacher, this woman has been caught in adultery, in the very act. Now in the Law Moses commanded us to stone such women; what then do You say?” They were saying this, testing Him, so that they might have grounds for accusing Him. But Jesus stooped down and with His finger wrote on the ground. But when they persisted in asking Him, He straightened up, and said to them, “He who is without sin among you, let him be the first to throw a stone at her.” Again He stooped down and wrote on the ground. When they heard it, they began to go out one by one, beginning with the older ones, and He was left alone, and the woman, where she was, in the center of the court. Straightening up, Jesus said to her, “Woman, where are they? Did no one condemn you?” She said, “No one, Lord.” And Jesus said, “I do not condemn you, either. Go. From now on sin no more.”
Jesus Still Didn't Condemn
In John 4:18 Jesus knew the woman at the well's heart and revealed that she was an adulterer. He did not take the woman at the well and have her stoned as the law says to do. Jesus didn't carry out any of the punishments of the law.
Jesus said in John 3:17, "God sent his Son into the world not to condemn the world, but to save the world through Him." In John 12:47 Jesus says, "I did not come to condemn the world, but to save it." So Jesus could have done this or something like this. It certainly was in His character & mission to do so.
Jesus & Stoning
We can still know how Jesus felt about stoning without this story. Jesus said the second greatest law was to "love your neighbor as yourself." If you were caught in sin that was punishable by death you would want to be forgiven. You would not want to have stones picked up by others to kill you. If you love your neighbor as yourself you wouldn't pick up stones to kill Him. You would instead say, "Lord have mercy on us all!" So Jesus ranking love your neighbor as yourself at the top of the law lets us know what Jesus thought about people carrying out the punishments of the law. Again there is no instance where Jesus carried out or approved of one of the law's curses/punishments being inflicted upon someone.
Go & sin no more.
In John 5 Jesus heals a man. Later in 5:14 Jesus encounters him in the temple & says to him, "See, you have been made well. Sin no more, lest a worse thing come upon you." Unlike the woman caught in adultery no specific sin was made mention of for this man. Jesus gave the man a reason to sin no more, to keep a worse ailment from coming upon him. Jesus had not yet drained sin of its power so Satan was able to bring sickness to people because of their sin. We know he could do this because he was able to in Job 2:7. Satan "steals, kills, & destroys" because sin gives him an opportunity to do so. So Jesus told this man this so he would stay well.
This was one of the purposes of the law also. Before Christ provided His life & His Spirit from the resurrection obedience to the law was a way to protect yourself from Satan's power. In Leviticus 18:5 God says, "Keep my decrees and laws, for the man who obeys them will live by them." Literally "live by them," as in, if you refuse to keep them you are in greater danger of Satan ending your life because as Hebrews 2:14 says "Satan holds the power of death."
Today people can be spiritually born of God which makes them one with God in Spirit. So 1 John 5:18 says, "the evil one cannot touch someone who is born of God." Jesus would not tell a Christian to "sin no more" today because Satan is powerless to use sin against a Christian (though he can still deceive you). Note that this is the only time Jesus told someone to "sin no more." And it wasn't for "heaven's sake" it was for health's sake.
Mankind is no longer under the law thus God does not relate to us based on sin or lack of sin. Christians need not be conscious of sin because Jesus has cleansed them. Romans 6:14 says, "sin has no power over you." Now that God offers His Spirit & His Life to save & protect mankind sin is exclusively a relational issue between humans. Of course Jesus doesn't want you to go around hurting yourself & others. Jesus keeps us safe & His love walks us out of the problems our flesh has without ever charging us with sin or having to command us to "sin no more."
God offers us freedom from sin consciousness because the very concept of sin is self-centered. Labeling your actions as sin & keeping a tally of your sins makes you focus on yourself & your faults rather than empathizing or reconciling with those you have done harm to. If you don't believe this is true I guarantee you haven't tried living without counting sins against yourself. You don't have to be sin conscious to be love conscious. Jesus never told anyone else, including His disciples to "sin no more." And He certainly didn't tell them to pass that on as an essential effort for all Christians to continually make. It is for freedom from sin that Christ set us free from sin. If I was a prisoner of war & was set free but still focused my mind on my time as a prisoner I would not be free in my mind. Your Spirit & identity has been made free from sin already. Free your mind from the consciousness of sin & you'll experience the victory over sin that you've always dreamed of.