I agree to look into balanitis. The symptoms on your penis do sound like those of balanitis. But that would not account for your mouth issues. Read this article too https://www.medicalnewstoday.com/articles/246615 It talks about thrush. You could have thrust both on your penis and in your mouth. That is definitely a possibility. I agree you need to see a doctor to sort it out!
'bumping uglies', haven't heard that in a while. ha. Funny.
You say you haven't "bumped uglies" - have you had any kind of sexual activity - given or performed oral sex?
So on the penis - the pus like gunk sounds like something called smegma, which essentially oils from the skin, skin cells, and moisture. This can happen with infection and if you aren't cleaning your penis properly.
It is shameful that we don't teach men how to properly do this, but I'll spare you my lecture. It may not be hygiene if you are cleaning it daily, but I just want to make sure you are properly doing it.
A couple of helpful links -
https://theconversation.com/how-do-i-clean-my-penis-125135
https://www.nhs.uk/live-well/sexual-health/how-to-keep-a-penis-clean/
There's an infection called balanitis that is quite common, especially in men who still have foreskins. It doesn't sound like that's what you have, since it goes away, but just for some FYI - https://www.healthline.com/health/balanitis
It could also be an allergic reaction to something. I'm struggling to think of something that you'd be eating or drinking or using in your mouth that you'd also use on your penis, but perhaps there is something.
One thing that it could be is yeast or thrush. That can happen in the mouth and on the penis. This is more common in people with diabetes when their levels aren't as controlled as they should be. Do you have diabetes? Are you at risk for it?
The next time it happens, definitely get in to see your doctor, or take pics of both so your doc can see it.