Intuitively, I would also see disgust or fear of contamination as a plausible pathway. However, the explanation that has been discussed in the literature is that trypophobia-eliciting stimuli have basic visual characteristics that are also found in highly poisonous animals (Cole & Wilkins, 2013). Quoting their abstract:
Phobias are usually described as irrational and persistent fears of certain objects or situations, and causes of such fears are difficult to identify. We describe an unusual but common phobia (trypophobia), hitherto unreported in the scientific literature, in which sufferers are averse to images of holes. We performed a spectral analysis on a variety of images that induce trypophobia and found that the stimuli had a spectral composition typically associated with uncomfortable visual images, namely, high-contrast energy at midrange spatial frequencies. Critically, we found that a range of potentially dangerous animals also possess this spectral characteristic. We argue that although sufferers are not conscious of the association, the phobia arises in part because the inducing stimuli share basic visual characteristics with dangerous organisms, characteristics that are low level and easily computed, and therefore facilitate a rapid nonconscious response.
There is not much research on this phobia though, so it may still be that contamination fears are also a contributing factor.
Cole, G. G., & Wilkins, A. J. (2013). Fear of holes. Psychological Science, 24, 1980–1985. doi:10.1177/0956797613484937