The origins of holy water are not that difficult really.
Said origins have some basis in the religious/doctrinal/dogmatic "cleanliness" practices of the old abrahamic parent religion. Before entering the temple, (a very clean place), people would ceremonially wash and purify themselves in special baths before entering the temple grounds.
https://en.wikipedia.org/wiki/Ritual_washing_in_JudaismThis practice of using temple provided baths/water to cleanse one's self, both physically and spiritually (It does not matter if you are squeeky clean before entering the bath, the bath is a ritual, and symbolic as well as physically practical) presages the use of holy water for this purpose.
It gains additional religious significance through the many allegories of the holy spirit itself being likened unto a fount of endless, indwelling water-- to purify, sanctify, and quench a parched and weary soul. (
See jesus' message for the Samaritan woman at the well.)
Thus, holy water is a physical manifestation of this spiritually cleansing "indwelling water", given freely by the priest.
One can make arguments that holy water (in actual catholic tradition) requires clean, pure water, and cannot be defiled with filth, since the holy spirit it is an allegory of is pure in every possible sense-- However, this could also be countered with the teaching to Peter,
where God the Father tells him that he can make *ANYTHING* clean. I would thus say, if you wanted to use it as DnD fodder, you can say that using less pure things requires much more faith, and thus requires strong religious ties to the deity in question, and requires a high level to perform.
That would be my advice anyway.