Start with the hose when you wash and reach in! It is pretty smelly so rubber gloves are a good idea. As well as the loose flaky greasy material at you can take out, you will have to go for the 'bean' which is in a little pocket just around from the penis opening, not in the opening, you can get your finger in there and might find quite a hard build up of material there which can cause discomfort if not removed. Be careful, stand clear of where you can be kicked or ask for a helper to hold the horse pr pick up a forefoot.
Best advice is to get it sorted out as soon as possible, depending on what the situation in there is it can be fatal. First check if there is not a tick or something in there. If not is there like 'smegma' (grey/white/black puss) in there or dripping out? Or it it dry? And now a very weird question, is his penis normal? Are there any abnormalities? Discoloration, warts or anything? Best treatment is probably calling a vet or home treatment is also possible, feed him immune boosting supplements and herbs, rooibos, tumeric and try hosing the sheath drying it and applying lubricants, hope you can find some help from this 💖
if it's that bad i would suggest to call the vet and get medication soap to help.