When my ducks escape, I pick em up and toss them in their pool. It isn't a punishment, because they wouldn't understand what they did wrong.
It's just me being silly and they rather enjoy it. Keeps them from escaping for about 60 seconds and then they run away again. 😂