Are sexually transmitted diseases kind of a way of punishing promiscuity?

Not really. Just a result of promiscuity. Nobody is punishing anybody with these, anymore than with pneumonia or urinary tract infections or heart disease. They are just part of life.