Okay, yes, for full disclosure it CAN cause complete debilitating pain. It's a perfectly fine technique to use in a novel. Now for the real-world discussion.
First, off the testicles are behind the penis for a reason. A direct kick to to the penis doesn't do much damage at all. Ideally, you swing up to strike your target from underneath. One of the techniques I used to teach in women's self-defense courses was to just swing the whole leg up rather than trying to use the foot in a karate-like straight-on kick. A knee can work, too, but if you're that close, the angle isn't as ideal as using the leg from 30" away.
Second, aim is one of the first things to go in a real fight. You've all seen the cop shootout videos where people empty entire magazines at each other from 10 feet away and miss all over the place. The testicles are an easy target to miss. Usually, the kicker hits the thighs, hits too high, etc. A second try is difficult because he's alert to that attack.
Third, some people, when planning for violence, wear cups. They're not complete protection, but they work wonders for casual kicks. True story: in karate tournaments, even in point competition, you hear about cups being broken. I've seen it. (Tell me that's not scary, guys.) I know that's not relevant to your story, but there it is. Also, you can withdraw the testicles into the body cavity for further protection. Sumotori do it when competing.
What also works well is a grab and squeeze. There's a karate technique where you strike the abdomen with the other hand while you yank away. The low strike causes the body to instinctively withdraw the testicles, at the same time as you're trying to remove them. Gichin Funakoshi, the founder of Shotokan karate, used a groin grab when confronted by a would-be robber one time, and that was all it took to end that encounter (he later felt bad because he figured it was an out of work soldier after the war; Funakoshi would have been at least 70 at the time). The grab doesn't work in tight pants, but the clothing in your setting would definitely allow it, and your control is much finer than with a kick.
Probably more than you wanted to know about crotch-kicking, but if you're going to do research, you might as well be thorough.