For the cupcakes: Preheat the oven to 350 degrees F. Line the muffin tin with cupcake liners.
Put the butter, cocoa and stout in a microwave-safe bowl, cover loosely with plastic wrap, and microwave until the butter melts, about 2 minutes. Whisk to combine.
Meanwhile, whisk the granulated sugar, flour, baking powder, baking soda and salt together in a large bowl. Whisk the sour cream, vanilla and eggs together in a small bowl.
Whisk the cocoa mixture into the dry ingredients. Stir in the sour cream mixture just until combined, being careful to avoid over-mixing. Divide the batter among the prepared muffin tins, filling each about three-quarters full, or about 1/4-cup per cupcake. Bake until a toothpick inserted in the center of the cupcakes comes out clean, about 25 minutes. Cool the cupcakes completely in the tin on a cooling rack, about 15 minutes. Remove from the liners and return the cupcakes to the rack.
For the frosting: Place the brown sugar, cinnamon, ginger, allspice, nutmeg and egg whites in a large metal mixing bowl set over a pot of simmering water. Whisk constantly until the sugar melts and the mixture is very thin and warm. Remove the bowl from the heat and transfer to a stand mixer fitted with the whisk attachment. Whisk on high speed until stiff peaks form, about 5 minutes. Continue beating on low speed until cool.
With the mixer set to medium speed, beat the butter a few pieces at a time. The mixture may curdle before coming together. Using a spoon, offset spatula or piping bag, dollop, spread or pipe about 1/2 cup of the frosting on each cupcake. Occasionally beat the frosting to maintain the smooth texture. Decorate with sugar flowers if using and serve.
Consumption of raw or undercooked eggs, shellfish and meat may increase the risk of foodborne illness.