I don't know that the croaking frogs were trained so much as responding to a deep voice, thinking it's a frog croak. Mine respond to my father's voice sometimes too.

You can train frogs by rewarding them, though yeah. To reward a pooping frog you'd have to catch them while they were pooping and most frogs aren't in the mood to eat at the same time maybe. I don't know it could work?

It might be easier to temporarily line the frog tank with paper towels so any poops are visible.