Whisk together the flour, cocoa powder, baking soda, and salt, in a small bowl, then set aside.
Place the chocolate and butter in a large heat-safe bowl. Melt the chocolate and butter in the microwave, heating in 30-second intervals and mixing thoroughly between each interval. Once the chocolate is fully melted, remove the bowl from the heat, and stir in the sugar.
Add the egg, vanilla, and sour cream, and whisk until the mixture is well combined, scraping down the sides and up the bottom of the bowl as needed.
Add in the dry ingredients and whisk until they are just incorporated.
In a small cup, whisk together the hot water and espresso powder (if using), then add that mixture into the batter and whisk until completely combined and smooth, about 1 minute. (Do this carefully as the water will splash around at first!)
Spoon the batter into the prepared pan, filling each liner until almost full; you’ll use about 4 tablespoons (62 g) of batter per cup. Bake the cupcakes for 18 to 20 minutes, or until a toothpick inserted into the center comes out relatively clean with a few moist crumbs. Allow the cupcakes to cool completely before frosting them.