The mistake that the villagers made (I have a hard time calling demon-worshippers "good guys") was in lynching random people. You knew that odds were very good that you would be lynching an innocent villager, but you did it anyway. You would have been much better off not killing anyone without proof.