First of all, I think the two things are totally related. They're related because they both involve experimentation with "naughty" words and behaviors -- and these things are really exciting to kids this age. Little boys use toilet talk and bad words to show off for each other. The "naughtier" the word, and the more you make a big deal of it, the more powerful and tempting it is for them.
I think you're handling this in a counter-productive way, because you are making these things seem even more forbidden and naughty than they already are. And you're looking at this as though some other "bad" kindergartner introduced your kid to this. Trust me, they ALL find out about bad words and language; it's what they do with it that matters. Your kid is no better or worse than the kid who introduced him to it.
My son and his buddies went through a "bad words and nasty talk" phase when they were in first grade. Not so much the F word, but calling each other "fart face" and "poopy breath" and similar stuff. When this kind of nasty talk spilled over into our home, I didn't try to say "don't ever say those words." I can't enforce that. Instead, I said, "I don't like that kind of talk in my home. You can talk that way with your friends in private if you want to. But that talk is not for home and not for school, got it?"
And I think you can deal with the private parts thing without ever crossing a line into the birds and the bees. Experimenting with showing these parts is already being fueled by the fact that they have a fascinating connection to sex that kids this age are just starting to become aware of. So giving a non-answer or explaining their explicit connection to sex will fuel his enthusiasm for this "naughty" activity. What you want to emphasize is their connection to pee and poop. Those parts are private for the same reason there's a door on the bathroom -- because no one wants to see or smell another person's pee and poop or be reminded of their pee and poop by seeing the parts that make them.
Be consistent and firm, but keep it oriented on manners and what's appropriate for polite conversation. That way you don't add more fuel to the fire. I had to have this conversation with my son more than once, but his friends' fascination with toilet talk gradually cooled off. Do they still call each other fart-face in private? Probably. Do they have the self-control at age 8 to keep it on the down-low? Yes, because none of the moms are hearing it now.
As for the teacher's reaction, I'm sure the school has a game plan for dealing with this problem. Let the teacher handle it at school, and reinforce at home as necessary.