Your answer is even shorter- This was a no risk exposure for all STDs. You have no need to be concerned and do not need testing for the events you describe.
STDs are just not effectively transferred from person to person on people’s hands. Secretions that might get on the hand dry quickly and are exposure to air which is also toxic for them and for those reasons, STDs are not transmitted in this way.
The question you ask is one we encounter often and just to show you that Dr. Handsfield and I are on the same page here, I have just pasted a recent reply that he wrote to another client on the same topic. Here it is:
“The reason that some infections are transmitted only by sex, direct blood exposure, and other very intimate contacts (transplantation, childbirth, etc) is that they CANNOT be transmitted by other means. Why not? Because large amounts of the causative bacteria or viruses must have direct access to susceptible tissues, which typically are deep inside (gonorrhea, chlamydia, HIV, HBV, etc); or they must be massaged vigorously into susceptible tissues, often with microscopic trauma (syphilis, HSV, HPV). This is how these bacteria and viruses, and the human interactions with them, evolved over thousands of human generations and millions of years, and it is an essential biological difference between STDs and, say, colds, influenza, common intestinal infections, measles, chickenpox, and a hundred other infectious diseases.
This is why STDs are not transmitted by kissing, hand-genital contact, contact with a contaminated environment, or from such fleeting contact like you describe here -- even fleeting contact with the genitals. Nobody can say the risk is zero from what you describe. But in 30+ years in the STD business, I have never seen or heard of such transmission occurring. The people who show up in the clinic with HIV or other STDs always have had intercourse or direct blood exposure, as through shared injection equipment -- we simply see no exceptions.
So if there is risk in the sort of exposure described in your question, it is far too low to measure or worry about. This also explains our universal reassurance to questions about mutual masturbation, contact with potentially infected secretions in the environment, and most sexual exposures other than insertive sex. "
Hope these comments help. No risk, no need for testing. EWH