I have only needed two penis exams in my life. The first was with a male doctor who asked me to retract my own foreskin. Quick examination, no problems. Not too much embarrassment. That was maybe 10 years ago.
The second exam was just last week. I had (what I suspected) was balanitis and phimosis (complications from uncontrolled diabetes) and made the first available appointment with a GP at my local clinic. It was with an older female doctor (perhaps in her late 50's) that I had not met before. She had me take down my jeans and lay on the examination table. The doctor then retracted my foreskin without much warning, began rubbing the tightness of the affected foreskin and then proceeded to take a few swabs from the tip of my glans, foreskin and urethra.
Much to my surprise, she mentioned that there appeared to be some "blue fluff" in my urethra (from my blue boxer shorts) and said she would try & remove it - using a swab. She was swabbing my urethra for about 30 seconds and then commented that it was probably not the best instrument to do it - and apologized. A few moments later, she asked if I was OK, then she kept repeating "oh... I'm sorry... oh... I'm sorry". I raised my head from the examination table and looked down at my penis. I was semi erect and fluid was flooding out and dripping everywhere. I am guessing the doctor returned the foreskin to its covered position however it is possible it retracted on its own.
She left me to get dressed. With fluid still leaking heavily, it was dripping into my boxers and down my leg when I got dressed. Exposing my purple glans, complete with red tip, swollen/tight foreskin and then getting an erection - I don't think I am ever going to get over the humiliation and embarrassment.