In a 3-quart heavy-bottomed saucepan, melt the butter over medium-low heat. Add the onion and cook, stirring often, until softened and translucent, 3 to 5 minutes. Gradually whisk in the ⅓ cup flour, stirring until smooth. Gradually whisk in the milk and continue to cook, stirring, until the sauce is quite thick. Whisk in the cheese, if using, and nutmeg. Fold in the ham and parsley. Season the mixture with salt and pepper. Spread the ham mixture into a shallow baking dish and place in the refrigerator or freezer until well chilled.
In a mixing bowl, beat the eggs together with 1½ to 2 tablespoons water. Place the ½ cup flour on a plate or small platter. Place the bread crumbs in a shallow baking dish and season them with salt and pepper. Shape heaping tablespoons of the ham mixture into cylinders about ¾ inch thick and 2½ inches long. Dip the croquettes first in the flour, then in the eggs, and then roll them in the bread crumbs. As they are coated, place the croquettes on a baking sheet and refrigerate until all of the ham mixture is used. Cover the croquettes and chill for at least 30 minutes. This will help them to hold their shape and make the coating adhere. The croquettes may also be covered and frozen at this point for up to 2 weeks.
Preheat the oven to 250°F. In a deep-fryer or a deep, heavy skillet, heat at least 2 inches of oil to 360 to 375°F. Add the croquettes in small batches and fry, turning occasionally, until golden brown, 3 to 4 minutes. Remove them with a slotted spoon or spatula and drain or baking sheets lined with crumpled paper towels. To keep the croquettes warm as you fry them, move the baking sheet to the oven. Serve warm.