I've been doing some research on public shaming recently, and have been encountering the term "witch hunt" a lot. Given contemporary writings, did there seem to be a level of awareness (among scholars of the time) that this was what was really going on during European and American witch hunts (i.e. that these people were scapegoats arbitrarily demonized by the community)? Or is this just a poorly appropriated term?
Yes. The witch trials were a "witch hunt" in the sense that the accusers believed the accused suspects were witches. At the time, the definition of a "witch" meant that a person signed a covenant with Satan against God and then the actions of a witch were in service to the Devil, ie afflicting the girls was a way to torture the girls to sign the Devil's book. Evidence of witchcraft would be poppets, essentially what people think of voodoo dolls today, and the witches stuck pins in the poppets to harm the afflicted. Chadwick Hansen's book from the 1960s Witchcraft at Salem argues that some accused suspects actually practiced witchcraft. Testimony from William Bly against Bridget Bishop claimed that Bly and his son found poppets in Bishop's home while repairing a wall almost a decade before the trials. Whether Bishop did practice witchcraft can be debated and can never be confirmed, but those accusing her believed she practiced witchcraft. However, a lot of these accusations are convenient for the accusers, particularly the Putnam family which is the subject of Paul Boyer and Stephen Nissenbaum's book Salem Possessed. The Putnam family was a large and wealthy family during the time. Thomas Putnam Jr.'s daughter Ann Jr. accused more people than anyone else during the trials. One of the first accused suspects, accused by Ann Putnam Jr., was Sarah Osborne. Osborne married Robert Prince who had sons from a previous marriage. When Prince died, his sons were still not old enough to inherit Prince's land but they would receive it when they reached adulthood. Thomas Putnam Jr. and Prince's brother-in-law John Putnam were the executors of the will. Meanwhile, Sarah (Prince at the time) hired an indentured servant, Alexander Osborne. Boyer and Nissenbaum describe it as Osborne "quickly made it from her [Sarah] barn to her bed." The relationship was scandalous but eventually Sarah married Alexander. Alexander wanted control of the land Robert Prince left his sons and began a legal battle for the property, fighting the Putnams who represented Prince's estate. The courtroom battle continued into the 1720s, long after Sarah's death in jail during the trials. When Thomas Putnam Jr.'s daughter made accusations, Osborne was an easy target as a woman with a scandalous reputation and a woman his family had an ongoing legal battle with, so she was convenient. When these accusations were made, people were often skeptical but rarely spoke out. Then in the courtroom, the afflicted girls put on a show, rolling around screaming, making claims of specters attacking, and mimicking the movements of the accused. It convinced people of guilt. Once people believed witches were in the community, it was simple. On that note, the first three accusations of Sarah Good, Sarah Osborne, and Tituba were exceptionally important. In Records of the Salem Witch-Hunt, the editor Bernard Rosenthal adds a note to the examinations of the day commenting on the testimony. None of the women denied the existence of witchcraft. Good and Osborne denied that they were witches and Tituba confessed. Good proceeded to claim Osborne was the witch and Osborne claimed she was more likely to be bewitched, citing an incident from a couple years before the trials. This provided legitimacy for the community to believe there were in fact witches. While a lot of the accusations included a political motive, it was still very reasonable for the community to believe in witches. Satan was a very real figure to the Puritans and they believed the Devil intended to destroy the Puritan church. There were demons everywhere in their mind, the Popish Plot created fear of Catholics and the Indian Wars caused a lot of war paranoia which also helped propel the trials, see historians like Mary Beth Norton and Emerson W. Baker for more on the Indians and the Maine frontier influencing the Salem community to make more accusations (roughly a third of those involved in the Salem Witch Trials had connections to the frontier wars).
In After the Fact (pdf of the chapter here), the authors describe work done by Paul Boyer and Stephen Nissenbaum, who mapped the homes of the accused and the accusers and came to the conclusion that the trials were the result of disgreements between, on the one hand, residents who wanted to start their own separate village, and, on the other, residents who were afraid of losing taxpaying citizens to the new town.