Holy water and special amulets such as religious relics, were used to confer spiritual protection. This protection bestowed upon a person the ability to work with the sick without any fear of contagion. Such persons were revered as very special. Their manifest ability to resist contagion was abundant confirmation of their spiritual purity. The folk tradition in most countries is packed with examples of this theme of purity and contagion.
Several problems exist with the modern bacteria doctrine.
One is that infection is not universal and nor is the disease cured by removal of the germ. There is also the problem of why someone gets ill and why others don't. These are partially explained by immunology, but the suspicion persists in many quarters that some more subtle form of contagion must still operate. And then there are the inner personal reasons behind an ill person. It is also invalid to contend, as many medical historians do, inebriated as they too often are by the hallucinatory wine of modern science, that the idea of contagion was the bacteria doctrine in a simpler form waiting to become somehow completed, modernised or rendered more sophisticated by the germ theory.