Greetings to HCM
It is generally a rarely observed scenario in which fecal matter enters to vagina because of the position and relationship of both the orifices with each other. How ever in unusual situations it may occur.
First thing is whether you got yourself investigated for the diarrhoeal episode and , if yes what is the pathogen. You may have to take a course of a drug against that pathogen, particularly if it is one of a protozoan parasite.
If not got investigated or no infectious etiology was found, probably it is an yeast infection, because yeasts are many a time found in stool of a normal person. You may ned to apply a local antifungal
Do pay a visit to your obstetrician for examination of any lesion, if present. It may help identify the etiology and will favour choosing a treatment.
All the best.
Get well soon.