Thanks for your query.You have developed swilling of the foreskin and collection of smegma
behind the foreskin which you are unable to retract.This is due to repeated infection which has finally turned up into Phimosis
.You have rule out Diabetes
Pl get your blood Sugar levels done .As regards the treatment for Phimosis you have to consult Surgeon and get Circumcision
done This will solve the issue for forever.