My initial concerns is how devitalized, and swelled the tissue on the distal phallus is looking - I'm afraid repeated attempts to moisten the tissue, and push it back in will prove to be a futile task. The phallus will likley need to be surgically amputated, which could be done at home but would preferably be done at a vet office under anesthesia, and an analgesic. Please consider contacting some of the avian veterinarians referenced below.
https://www.beautyofbirds.com/recommendedbirdvetsohio.html
If you haven't, move the duck inside into a warm spot and moisten the area with KY jelly, or a water-soluble lubricant to keep the tissue moist. If a vet is not an option, amputation may be the last resort; in that scenario, I would disinfect the area with an antiseptic prior to incision and cut the phallus using a pair of sharp sterile scissors. An antibacterial ointment or lubricant can be applied after to promote the receding of the phallus back into the body. Due to the risk of infection, antibiotics may be recommended subsequent to amputation. Here is some additional information on the topic.
https://www.backyardchickens.com/th...uck-phallus-penis-under-construction.1293789/
https://allbirdproducts.com/products/baytril-10