Your son sounds adorable. <3. I love him.
Earthworms do have parasites. So do slugs. The ducks eat them and then they live in the duck. A low amount of parasites is normal in ducks and doesn't usually hurt them, but if the numbers get too high the ducks can get sick. My vet told me all the above paragraph. Knowing this doesn't stop me from playing with my ducks in the garden and allowing them to eat earthworms. It gives them great joy. It gives me great joy. I don't want to keep my ducks in a bubble of safety void of joy.
I get my ducks tested for parasites at least twice yearly. My ducks are pets, not livestock. They often have excessive parasites. Sometimes they don't. One in particular almost always has excessive parasites. We have a lot of slugs.
Even though I adore my ducks, I would let your son go crazy feeding them earthworms. Even if I couldn't afford to take my ducks to the vet for exams and parasite testing I would. I would just deworm them if they got diarrhea or other clinical symptoms.