Hello,
Thank you for your query at DoctorSpring.com
I have reviewed the images and they look like fungal infection - candidiasis.
You need to start applying Clotrimazole ointment on the affected areas for 2 weeks, and you can also take One dose of Fluconazole 100 mg.
It should resolve on applying Clotrimazole. This is not because of smegma as you correctly pointed out.
Kindly reply if you have further queries,
Regards.