Salem stopped, which most European episodes did not do so cleanly, and it stopped for a reason worth understanding.
Clergy including Increase Mather argued that spectral evidence could not be trusted, on the theological ground that the Devil might take the shape of an innocent person. That argument did not require anyone to abandon belief in witchcraft, which is why it could be accepted. Once spectral testimony was excluded, the cases fell apart: a new court sitting in 1693 acquitted almost everybody brought before it, and the governor reprieved the rest.
Then something unusual happened. Massachusetts began, slowly, to admit that it had killed innocent people. A day of fasting and repentance was observed in 1697. One of the trial judges, Samuel Sewall, stood in his church while his statement of guilt was read out. Twelve jurors signed a declaration of error. The colony began reversing attainders and paying restitution to families from 1711. The process was incomplete and it took centuries to finish: the last of the condemned were formally cleared by the state in the twentieth century, and one name, Elizabeth Johnson Junior, was not cleared until 2022.
That long tail is the most instructive part. The community that hanged its neighbours in 1692 was made up of people who believed the theology, followed the procedure, and were then unable to explain what they had done.