If both your chickens and ducks are sick I would expect the land is likely sick, I'm not anything more than vaguely familiar with ducks but I do know they're physiologically quite different to chooks or land fowl, and I don't know how many diseases chooks and ducks share... But no matter the disease, making sure the land is healthy is always important to overall health.
I'd use calcium carbonate (lime) to sprinkle over all the ground they walk on. That form of lime won't burn them but it will help the land's health a lot. Pathogen overload is a common problem with overstocked land or any land where animals live nonstop and have done for a long time, even if they're only small numbers. Compacted and feces-overburdened ground in coops and around them is anaerobic which is ideal for most pathogens.
Ducks I expect would use other plants in the wild state for their own medicinal needs than garlic, but I don't know what plants specifically those are; many reeds, lilies etc have medicinal properties though. Also, primitive chooks would of course have used other herbs, all wild animals tend to, but who knows what herbs Junglefowl use? Garlic will do a great job, and it's even possible they can no longer tolerate what their ancestors would have in terms of native plants, since they've developed some dietary alterations (i.e. tolerance for legumes etc) under thousands of years of domesticity and adaptation to foreign lands.
If multiple diverse species are ill, the food, water, soil, coops, etc all must come under inspection. Unfortunately food, land etc is often far more polluted than we truly want to know. Sometimes we've been horrified by what we've found in soil around sheds, water tanks, dams, etc, on numerous places we've lived on.
Best wishes.