Some of the symptoms you are seeing can definitely be consistent with a food allergy (skin problems which would include the penis and anal area). Because it is a year round problem, food allergies
are more likely than environemental allergies depending on where you live (you didn't answer that question). You are currently using a hypoallergenic
diet. You may consider trying a different type (kangaroo and oat, hills z/d, etc).
Some of the other symptoms could be secondary to colitis
. Colitis is inflammation of the colon, rectum, etc. The symptoms include soft stool, blood or mucous in the stools, straining, small amounts and increased frequency, urgency, etc. Not all dogs show all of the symptoms. It is hard to tell (especially without me seeing the dog) if the blood is just from the anal area or if it is actually from the rectum and comes out when the dog defecates or strains to defecate. Anal gland issues would be another potential issue. There are other medications which it doesn't sound like you have tried which may help this condition (such as metronidazole, etc).
I am not saying your veterinarian has done anything wrong. It sounds like a frustrating condition, however, it doesn't sound like the current treatment plan is causing it to resolve. I would consider a second opinion or telling your veterinarian you would like to be more aggressive in looking for an underlying cause.
LEt me know if you have any questions or concerns.