First about his Urinary Tract infection
, You have mentioned its continuous. If the episodes were proven as infection by urine culture, he needs to be evaluated further for his recurrent episodes.
Since he is 3 yrs, he can be very well potty trained. It should be done soon.
if recurrent can be a risk factor for frequent urinary infections too.
Give him plenty of water, fruit juices, vegetables and fruits. Avoid non fibrous fast food.
About the swelling in his testis, it looks like hydrocele
(fluid in the testicular sac). Doctors can differentiate hernia
and hydrocele based on certain examination findings. You may have second opinion
with a pediatric surgeon for this.
Hope you find my answer useful