Preheat the oven to 400ºF. Coat a 12-cavity muffin tin with cooking spray and set aside.
In a large skillet, melt the butter over medium heat. Add the onions, apples, and 1/4 teaspoon salt and cook, stirring, until very soft, about 20 minutes. Add a few turns of pepper, the paprika, and cayenne, and cook 1 more minute, until fragrant, and then stir in the flour. Add the broth and white wine and cook until thickened and then add the cheese, stirring until melted. Taste and add salt as needed. Remove from heat and let cool while you shape the dough.
Roll out the dough to 1/4” thickness. Cut out nine 4”circles and nine 2 1/2”circles, re-rolling scraps when needed. Press the 4” circles into the muffin tins. Spoon the onion mixture into the tins and top with the 2 1/2” circles. Fold the edges over and pinch to seal them. Use a fork to poke holes in the tops. Brush with a thin even layer of egg wash and bake until golden brown. Begin checking for doneness at 25 minutes. Let cool in the pans on a rack for 10 minutes. Remove to the rack and serve.