Are there any ancient texts that show or imply that their authors knew that certain diseases were spread through sexual activity? It seems like sexual contagion was recognized in the 16th century during the height of the syphilis epidemic. I have even read that it contributed to closing of some brothels and the rise of Puritanism.
I am more interested if anyone in Rome, Greece, or the Middle East realized a connection between sex and disease during the Bronze Age or the Classical period. There were plenty of commercial brothels in the Roman Empire and plenty of temple prostitutes in the ancient Middle East. Is there any evidence of STD epidemics from then?
I realize that germ theory would not be around until the nineteenth century, but a ancient historian or philosopher still could have noticed a correlation.