As far as I know, there weren't any significantly life-threatening sexual diseases for most of human history in most of the world. Syphilis only affected the Americas before the 1500s, and HIV is much newer than that.
Most other sexually-transmitted diseases that existed in most of the world were unpleasant, but not life threatening, even before antibiotics. And it's also worth noting that most primates (and many mammals of all kinds) are not monogamous, and yet they are not plagued by STIs to any significant extent.
Instead, monogamy was much more important for managing babies, especially given how much hare human babies need, and for how long, compared to virtually any other animal.