Absolutely agree about The Beatles not being shy about songs referring to or about sex; a great example of that being “Why Don’t We Do It In The Road” from The White Album. Speaking of that album, “Happiness Is A Warm Gun,” is another example.
OP and anyone else who may be intrigued, there’s a fair bit to read online about ”Come Together” with quotes from John himself. The Beatles Bible website is worth checking out or perhaps start off looking up info about a guy called Timothy Leary, who had asked John to write a campaign song for him as Timothy wanted to stand in the election for Governor of California. Timothy had a planned campaign slogan of “come together - join the party.” That’s the origins of the song’s title anyhow.
I think Come Together is more a mix of nonsense lyrics with references to The Beatles. For instance the lyric, “He bag production:” John and Yoko had a PR company Bag Productions and that was a link to the “bagism” concept John & Yoko came up with as part of the peace campaign.