Hitting Rock Bottom

We have just learned extensively about the subject of the death penalty in the Gemara. What follows is a concise recap of many of the relevant laws, focusing primarily on stoning based on the Rambam.
The Rambam says there are 18 aveiros that are eligible for sekilah, stoning. Listed among them are idolatry, sorcery, and the willful desecration of Shabbos. However, the punishment of stoning (or any of the other death penalties) was rarely meted out, because rarely have all the necessary factors been present.
A person whose life had led him down a rocky road decided to commit the aveirah of idolatry. For him to be convicted of this crime, witnesses would need to be present and actually see him commit the aveirah. Circumstantial evidence is not valid in Sanhedrin. The proverbial “smoking gun” isn’t enough.
Moreover, the witnesses cannot take for “granite” that the individual knows that what he is about to do is a sin. Perhaps he was living under a rock. They need to warn him that the action he is about to perform has a penalty of stoning, and if he carries through, his life will hit rock bottom. He has to acknowledge the warning and commit the offense anyway, within roughly four seconds of the warning. Anyone who is ultimately stoned must have been off his rocker, committing suicide by proxy. What occurred must be firmly cemented in the witnesses’ minds because they will be grilled on it.