Communist spies! It wasn't that Salem suddenly decided that witches were no longer in their midst at the end of 1692, nor was it that United States anti-communists suddenly decided that there weren't any more spies or disloyal Americans in the mid 20th century. It was that the accusers had gone too far: in 1692, the governor's wife was accused of witchcraft, centuries later it was, in part, Senator McCarthy's accusation that war hero and American President Dwight Eisenhower was a communist. In Salem, the overzealous judge Staughton was effectively kicked off of the witchcraft court, and later Senator McCarthy was embarrassed on television and censured by his peers. Thus ended the panics, if not the belief that they had some legitimate aims.
Staughton and McCarthy were overzealous, and it was interesting to realize that some of their critics agreed that this had hurt a good cause. "Witches/communists remain a threat, but abuse of power has killed our will to fight the fight reasonably." It's not that different from environmentalists who booby trap trees that are in danger of being cut down, despite the fact that these traps could harm people, or abortion opponents who believe that God gives them the right to murder doctors. Many (most?) environmentalists, and many (most?) critics of abortion agree that extreme tactics hurt their cause. Caveat: "extremism" of the sit-in movement which desegregated lunch counters.
One of my favorite lines about the utility of extremism is from Malcolm X, who observed that the white establishment was opposed to Dr. Martin Luther King and the NAACP, but added with as much humor as seriousness, "And then the white establishment looked at me, and they proclaimed, 'Thank God for Dr. King ... and the NAACP!" The audience laughed and cheered.