Swimming in a pool treated with chlorine will typically not harm ducks. However, ducks that ingest large amounts of the chemical can experience damage to their internal organs.
Ducks that drink large amounts of chlorine water can get sick from the chemicals that make it to their digestive tract.
Ducks carry different types of diseases that can affect people. Whey they defecate in your swimming pool water, you can easily get infected.
Using a pool cover when the pool is not in use can prevent ducks from exploring. A wide open pool with no one in it can look like a great place to swim to a duck
Adding an automatic pool cleaner actually has two benefits: the surface and below water movement can scare ducks away, and your pool will be regularly cleaned.