Disclaimer: I my country it is generally acceptable to let young children run naked in certain places such as beaches (in fact, it is acceptable for all ages to be naked in public in some contexts), so I don't have much experience with these kind of situations (we mostly tell someone to dress the kids to protect against nettles or something). I've also lurked around and this is my first post, and I hope I don't break any rules, if I do, I humbly apologise.
I would raise the dog issue and the supervision issue.
Basically, try to word it that their son's rattling of the fence provokes the dog, but not in an accusatory way (I've found some parents who really doesn't take well to criticisms towards their children). Word it that you're worried about barking complaints and that the dog usually don't bark, but that the fence rattling can set it off.
Then, you could add that you're worried about the lack of supervision, as even if the garden is a safe zone, a child can get into lots of trouble, and feral animals, and wild animals in general, can get in. Look up if there's snakes in your area and suggest that in order to protect against snake-bites, the child should at least wear shoes, same if there's poisonous amphibians and insects. In fact, if there's dangerous insects, you could suggest him being fully clothed to prevent bites.
Basically, something like, "Hello neighbour, I feel terrible to ask you this, but could you please keep your son from rattling the fence between our gardens. It provokes my dog's instincts to bark, and I'm worried about the noise. Also, I noticed your son running barefoot and I'm worried about snakes/splinters/insects/animals getting to him."
Hopefully they'll think it'll look too ridiculous to have him run around naked but with shoes on that they'll at least put a diaper or underpants on him.
If there's poisonous plants around, you could always raise that they need to be with him at all times in the garden, because he might get his hands on those plants and become sick.
But, if nothing else, raise the splinter issue. One summer I ran around barefoot and ended up with blood poisoning because of a splinter. The treatment isn't fun, and the capsules I had to take were so large that I point blank refused, and if there hadn't been a great chemist with a home-brewed salve around, I could have died, or lost my entire right leg, so definitely suggest shoes at the very least.
But if you want to, you could go blunt and tell them how it is. In your family, it isn't the norm to let children above a certain age go naked in public, and it hinders your enjoyment and upkeep of the garden.
Just don't make it too much about the son being naked, because then a very protective parent might go "Neighbour thinks waaay too much about my son's state of dress" and well, it snowballs from there. Make it about norms and the practicality of the garden.