Preheat the oven to 350 degrees F. Grease a 9-by-13-inch pan and line the bottom with parchment paper.
In a medium bowl, stir together the cocoa powder and chopped chocolate. Pour the hot coffee over the top and stir until the cocoa has dissolved and the chocolate has completely melted. Set aside to cool.
Meanwhile, in a large bowl, whisk together the flour, both sugars, salt, baking soda, and baking powder. Add the eggs, buttermilk, oil, vanilla, and cooled chocolate mixture and whisk to combine until smooth and glossy.
Scrape the batter into the prepared pan and bake until the cake is matte and firm and a tester inserted into the center comes out clean, 35 to 40 minutes. Transfer the pan to a wire rack and allow the cake to cool completely.
To make the frosting, in the bowl of a stand mixer fitted with the paddle attachment, whisk together the powdered sugar, cocoa powder, espresso powder, and salt. Add the butter and boiling water and mix on low speed to combine. Increase the speed to medium and mix for 1 minute, or until the frosting is glossy and smooth, scraping down the bowl as needed. Add the melted chocolate and vanilla and mix to combine. Refrigerate for 30 minutes to firm before using. The frosting can be stored in an airtight container in the refrigerator for 4 to 5 days. Bring it to room temperature before using.
To assemble, scrape the frosting onto the cooled cake and use an offset spatula to smooth it out in an even layer. Top with sprinkles or sea salt. Cut into squares and serve. This cake keeps well wrapped at room temperature for 3 to 4 days.
