Preheat the oven to 350°F. Line a standard muffin pan with paper liners.
For the cupcakes: In a medium bowl, whisk together the gluten-free flour, cocoa powder, baking soda, baking powder, espresso powder (if using), and salt.
In the bowl of a stand mixer, or using a hand mixer, mix the sugar, oil, eggs, sour cream, and vanilla on medium-high until well combined.
With the mixer on low, add the dry ingredients in three additions, mixing after each addition.
Slowly pour in the hot water. Mix on medium speed for 2 to 3 minutes, scraping down the bowl halfway through, until smooth.
Divide batter evenly into the liners, about ⅔ full. Bake for 18 to 20 minutes, until a toothpick comes out mostly clean with a few moist crumbs.
Cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
For the marshmallow cream: In the bowl of a stand mixer fitted with a whisk attachment, or using a hand mixer, mix together the butter, powdered sugar, marshmallow creme, and vanilla. Beat until light and fluffy, about 1 minute.
Transfer to a piping bag, or a zip-top bag with the corner snipped.
Once the cupcakes are fully cool, use a cupcake corer, or a small paring knife to remove the center of each cupcake, stopping about ½ inch from the bottom. Save the centers.
Pipe the marshmallow cream into each cupcake until the filling sits just below the top edge, about 1 tablespoon of marshmallow cream.
Return the cupcake center over the top of the filling to cover it.
For the chocolate ganache: Place the chocolate in a small bowl. In a separate, small microwave-safe bowl, microwave the heavy cream until simmering, about 1 minute. Pour the hot heavy cream over the chocolate and let sit for 1 minute. Mix until smooth. If the chocolate still isn’t melted, microwave the ganache for 20-second increments at 50% power, stirring after each increment until completely melted and smooth.
Spoon the ganache over each cupcake.
For the vanilla buttercream icing: In a medium bowl using a hand mixer, beat together the butter, powdered sugar and heavy cream until thick and pipeable.
Transfer the buttercream to a piping bag fitted with a small round tip (Wilton #3 is perfect).
Pipe the classic swirl across the top of each cupcake. Enjoy!