Science that may have inspired this story.
About 10 years ago there was documentary about an Aids exposed man who did not get the disease. Because of his life style, he should have. There was extensive genetic study.
After some genetic search, they found a village in northern England that had never been severely effected by the plague. Some residents had ancestors that went back many centuries. The local churchyard bore their names. Present day residents still carried their genes. The upshot was that there is a plague/aids immune gene. One copy and one would get ill but recover. Two copies, and the disease would not be contracted, though not all carried the immune gene.
The gene originated in Scandinavia. Margaret Thatcher and Ronald Regan also carried the gene. Associated with it was a minor hand deformity. Nostradamus who was also a physician and constantly exposed to the plague, never contracted the disease.
I can see how this could have inspired this story. With so much superstition, including the church, it was not much of a stretch to imagine how a such a village would have been regarded.
It is sobering to think that probably most of us on IMDB have ancestors that survived that period in history.