To make the dough in a stand mixer: Pour the reserved cooking water and potatoes into the bowl of a heavy-duty stand mixer (or a large bowl). Add the sugar, melted butter, egg, yeast, and salt. Fit the mixer with the paddle attachment. On low speed, gradually add enough flour to make a dough that cleans the sides of the bowl. Change to the dough hook. Mix on medium-low speed until the dough is soft, supple, and elastic, occasionally pulling the dough down as it climbs up the dough hook, about 8 minutes.
To make the dough by hand: Pour the reserved cooking water and potatoes into a large bowl. Stir in the sugar, melted butter, egg, yeast, and salt. Gradually stir in enough flour to make a dough that is too stiff to stir. Turn out the dough to a floured work surface. Knead, adding more flour as needed, to make a soft, supple dough, 8 to 10 minutes. The dough should remain somewhat tacky, but do not add too much flour. If the dough does not stick excessively to the work surface, then it has enough flour. Generously butter a medium bowl. Add the dough to the bowl, turn to coat with the butter, and leave smooth side up. Cover the bowl tightly with plastic wrap. Let stand in a warm place until doubled in volume, about 1 1/2 hours.