"Penises are private. If you pretend that toy is a penis, I will put the toy in time-out."
"We keep our pants on unless we are in the bathroom or somewhere private. If you need to take your pants off, you need to go to the bathroom or your bedroom."
Six-year-olds aren't really good at understanding boundaries and privacy - and can really enjoy crossing those boundaries when they do understand. Your son is a smart kid, but he's probably not thinking about peer pressure or good decision-making. He's probably thinking that this never occurred to him before and the reactions and resulting drama are kind of exciting.
It's sometimes simpler to articulate a rule than to get a child this age to grok a deeper principle. If all of this is happening at camp, the counselors should be THRILLED to split the boys up. I would invite them to look for ways to do that. They could be in different groups, or always have a counselor in between them, or otherwise be encouraged to play apart.