Before Western religion dominated the west, the Greeks and probably others used to have Dionysian rituals which included music and sex. And now that you mention it, I think that is one of the problems I have with the "classical" period of classical music. It is too purified. I don't think the sexual aspect of music only came from Black churces. Later, of course, it was part of the blues.
But if we look at the Scotch-Irish with their wild dancing, and I think they ifnluenced country music a lot. Klezmer music had some bawdy Groucho Marx type humor. And of course we can't forget Gypsy music with women throwing up their skirts as they danced Flamenco. A number of composers were influenced by Gypsy music, but after the 18th century. As we get into the 19th century with its romanticism, many folk traditions were drawn upon. Even a bit earlier, Haydn drew on folk traditions which included the sexual aspect.
Here's a guitar concerto written by Rodrigo and played by Julian Bream. You might have heard it before. The second movement (I think) has the theme used in a very popular Miles Davis piece.