Caponizing is an option, but probably not the best one.
The first problem is that you probably don't have any vets near you that are practised in the proceedure. It went out of style a long time ago because of danger to the bird, and expense to perform the proceedure.
The second problem is that chicken testacles are deeply buried inside the body. It's not like a dog where you just do a quick cut and it's problem solved. This is open cavity surgery we're talking about, and it has a high mortality rate since most people don't bother to give their birds antibiotics afterwards.
I've seen several people post here about experimenting at home with caponizing, with no formal training in veterinary or medical science. I find that deeply DEEPLY horrific. BUT, I realize that it's individual choice. ( I am just very empathic, and get ill at the thought of someone doing untrained rooting around in my guts just because they were curious and thought of me as a lesser organism).
I'd rather see a bird processed for stew than see them be someone's 'experiment' for gee wiz reasons. It's pretty much animal cruelty to do untrained deep cavity cutting on an animal without any anesthesia.
I have to add that a rooster going under a professionally trained knife in a medical environment is a whole other kettle of fish.