If you saw some videos, there are some cats who actually trained and poop on the human's toilet. Do you know that cat poop can actually be dangerous? Because there's Toxoplasma Gondii on the poop which might not be necessarily able to be processed by the regular sewer system. There's a possibility that the parasites might be eaten by crabs or starfish on the waterway.
Now, how about dog poop?
The dog is a different story, flushing dog poop is considered one of the most environmentally friendly solutions. The bacteria and parasites in the dog poop will be able to be processed by the sewer system just like human's poop. But please don't flush the poop bag along with it :P it can clog your toilet.