My experience as others above, is that ducks learn to go to the coop and certain duck keeper behaviors encourage it!
When I go out and start moving food and water towards the coop, my ducks follow me down. When there is a change in circumstances -- for example if I need to get them in early as I am going out, I still go through the regular routine of taking food and water down to the coop, but I sometimes have to herd them. Pool noodles rather than PVC pipes are effective, but I often just pick up the latest downed stick from a tree and use that. I have recently brought one duck on a road trip [as he is best buddy to another duck that is sick and needs special care during the day, so he has to come on trips with me]. The first two evenings I picked buddy up and put him in the duck house -- he didn't want to be there as he wanted to be in the house with the sick duck. The third evening he took himself to the coop when I went outside. My boys are water averse, and they all take themselves to bed if there is heavy rain, or in cold months if there is any rain.
I have found that once ducks know about going to the coop, it's smooth sailing. I have had to use a dog pen to funnel recalcitrant ducks in the past, to stop them escaping into the shrubbery behind the coop where I cannot get to them. But even the recalcitrant ones get into the habit. Now, if a duck is reluctant to go to the coop, I immediately think he is being bullied in there. I provide separate cubicles or dog crates for reluctant ducks and that has always resolved the reluctance. I have one muscovy drake that gets into scuffles with another drake. He has to go in first and takes himself to his compartment at the back. Then the other boys go in. If the other boys go first, they realise their mistake and come out again.
Of course, ducks are like children There are always the naughty ones. My son has a bunch of naught pekins. Two will go into the coop but the third diverts from the procession to the coop and scoots into the bushes. Then the firt two come out looking for her, and three are then running round the bushes. When I care for them, I have to sit back for 5 or 10 minutes, then start the evening ritual again: pretend taking food to the coop. That generally gets them all into the coop! And, of course, they know when I am in a hurry and have no time for nonsense. That is when they are at their naughtiest about going to bed!! My own drakes are far better behave than they are