Thanks for your response.
I had a similar problem around three years back but since then there has been no issues and no unprotected sex.
I was in a relationship with my ex-fiancé at that time, who was healthy.
Doctor, I smoke very frequently and I am a regular drinker.
When last time I had this issue, I had consulted my dermatologist who had mentioned that it was a fungal infection and I was prescribed an ointment and the tablet AF 400 (Fluconazole) once a day, and I was cured.
Sometimes, when I do not masturbate for a couple of weeks, the skin becomes moist.
There has not been any unprotected sex with anyone in the last three to four years.
I use a moisturizing bath soap too.
I am attaching a picture here.