Hello,
STDs are difficult to get, because of the way they naturally spread. It's true that a bathroom is not an hygienic place, and plenty of bacteria and fungi can grow up on their surfaces and equipment. Having a good habit of washing the hands after using the flush or any other equipment will help you to keep general infections away. But in order to get STDs, there has to be a sexual encounter, whether it is oral, vaginal or anal. Some of them can also spread by sharing needles to inject drugs or sharing sexual toys. Some others can be transmitted by sharing towels.
The only real risk I can think after getting your fingers into your mouth could be an intestinal parasite like Giardia or some others, but I would not worry to much about STDs. If you fell sick in the next few days, please visit your doctor.
All the best.