Preheat oven to 350F/180C. Line a muffin tin with cupcake liners and set aside.
For the cupcakes: In a medium bowl, sift together flour, cocoa powder, baking soda, and salt. Set aside.
In a standing mixer fitted with the paddle attachment, beat together butter and sugar on medium speed until light and fluffy, about 2-3 minutes. Scrape down the sides and bottom of the bowl as necessary. On medium speed, beat in eggs, one at a time, beating well after each addition. Add vanilla extract and beat until combined.
With the mixer on low speed, add half of the dry ingredients and beat just until combined. Then beat in milk, followed by the other half of the dry ingredients, beating slowly until combined. Add hot water and beat just until combined. Do not overmix—the less you mix, the lighter the cake will be. The batter should be liquid.
Divide batter evenly between cups, filling them about 3/4 full. Bake for 15-20 minutes, or until a toothpick inserted into the center comes out clean or with just a few moist crumbs. Allow cupcakes to sit for 10 minutes, then remove from pan and allow to cool completely on a wire rack.
For the frosting: In the bowl of an electric mixer fitted with the paddle attachment, beat butter at medium speed until pale and fluffy, about 2 minutes. Add powdered sugar in 2 additions and beat until smooth. Add cocoa powder and beat until completely creamy and smooth. Beat in vanilla extract, melted chocolate, and heavy cream, mixing until combined. Add powdered sugar as necessary until frosting is spreadable.
Use frosting immediately to frost cupcakes, or store in the fridge, covered, for up to 3 days. Before using, bring to room temperature and whisk until smooth.
Cupcakes are best the same day they’re made, but can be kept in an airtight container at room temperature for up to 3 days. Unfrosted cupcakes can be kept in the freezer for up to 2 months. Thaw, still covered, on the counter or overnight in the fridge.