At 4 months old there's still time for the retained testicle to appear, so you don't need to make a decision yet. Also, personally I wouldn't have a Cocker castrated before at least 12 months old. They need time to mature physically before castration, especially with regard to their growth plates. If castrated early they have a higher chance of having cruciate ligament problems (can need major surgery and weeks of crate confinement) and other limb and joint problems because the growth plates may not have closed at the correct time.
My older Cocker was castrated at 15 months because his retained testicle hadn't appeared but there are plenty of people on here with Cockers where an undescended testicle descended anywhere up to a year old, maybe a bit older. So please don't rush into anything.
My younger Cocker has a hernia, roughly pea sized. When he had his vaccinations the vet was keen for me to book him in at 6 months for castration and hernia removal. The hernia didn't grow any bigger and Louis, now 4, still has his testicles and his hernia
. I realise it may be different for Rory's hernia if it keeps growing though.
Finally
, what are you feeding him on? It may be that a grain free kibble will help as grains are difficult for dogs to digest and they don't even need them in their diet. My dogs are raw fed and thrive on it, but it's not for everyone.