In a medium pot over medium heat, bring the butter, salt and the water to a boil. Add the flour all at once and stir it rapidly until all of the flour has been absorbed and a smooth dough forms. Reduce the heat to medium and stir the dough vigorously in the pot until it begins to dry out and pull away from the sides cleanly, about 2 minutes.
Transfer the dough to a stand mixer fitted with a paddle. Beat the dough on medium speed for 2 minutes to cool it down. Add the eggs one at a time, waiting until each one has been incorporated fully before adding the next one. Turn the mixer speed to low and add in the cayenne, nutmeg, mustard, cheddar cheese and ham. Place batter into a piping bag, then into the fridge to chill the dough before piping.
Preheat the oven to 400°F. Pipe 1½" balls onto a parchment lined baking sheet; sprinkle with Parmesan or cheddar cheese, if desired. The gougeres should be about 2" apart on the sheet tray. Bake in oven for 13 minutes until puffed and golden brown. Serve immediately. Makes about 72 gougeres.