There really is no risk here.
Since you've been googling, I'm sure you've seen something about "skin to skin" transmission of STIs. What this actually means is "genital skin to genital skin" and not skin like genital skin to back skin or arm skin to back skin.
It can also mean mouth to genital, and genital to anal, but your concern about your penis rubbing against his back is not a transmission risk.
Syphilis only transmits when symptoms are present.
Herpes can transmit when symptoms aren't present, but you only had a few seconds of contact, and you used a condom. I wouldn't worry about a thing.
I don't see any need for testing, and wouldn't waste any more time worrying about STIs. :)
Your question was fully answered by our members.
*** thread closed ***