To make the cake, preheat the oven to 350°F (177°C).
Line two 9-inch (23cm) round cake pans with parchment paper. Then generously spray the bottom and sides with a cooking spray.
In a medium bowl, whisk together flour, baking soda and salt.
In a big jug, combine hot water, cocoa powder, milk, heavy cream and espresso powder.
In a large mixing bowl with paddle attachment, beat the butter and sugar on medium speed until light and fluffy, scraping down the sides, about 4 minutes. Add the eggs one at a time, scraping down the sides of the bowl. Stir in the vanilla extract.
Add 1/3 of flour mixture, mix the batter on low speed, then add half of the liquid ingredients. Continue alternating the dry and liquid ingredients and mixing the batter until smooth, scraping down the sides.
Evenly divide the batter into the prepared cake pans and smooth the tops. Bake for 15-18 minutes, or until inserted toothpick comes out clean. Cool the cakes in the pan for 5 minutes. Then remove onto wire racks, peel off the parchment paper and cool completely.
To make the frosting, combine chocolate, butter and espresso powder in a medium bowl.
In a small saucepan, heat the cream to simmer over medium heat. Pour it over the chocolate and mix until the chocolate is melted and the mixture is nice and smooth. If needed, warm up the mixture in the microwave for 30 seconds.
Add Kahlúa and vanilla extract. Cover and refrigerate for no longer than 30 minutes. The mixture should be cool, but not cold.
Beat the chocolate mixture on medium high speed until soft peaks form. Make sure not to overbeat the frosting, or it’ll curdle.
To assemble the cake, spread half of the frosting on one layer of the cake.
Place the second layer and spread the remaining frosting. If desired, dust with sprinkles. It’s best to serve the cake the same day, while the frosting is fresh.