There are lots of things that could be going wrong but most of these would be identified by a good vet. Is there a chance that he got bitten by something? One horse was upset by using oil to clean his penis and had a swollen sheath and penis for several weeks, have you used something different on him? It might be worth calling another vet for a second opinion it can't hurt - have the information for him of the tests run and procedures carried out by your vet and explain that your vet is now stumped and see where it leads.