Preheat the oven to 300°F. Grease and line two 6-inch round cake pans, or one 10-inch round pan.
Melt the chocolate into the hot coffee, stirring until smooth. Let cool slightly.
In a large bowl, whisk together the sugar, flour, cocoa powder, baking soda, baking powder, and salt.
Add the egg, oil, buttermilk, vanilla, and the melted chocolate-coffee mixture. Whisk until smooth and well combined. The batter will be thin.
Divide the batter between the prepared pans, or pour into the single 10-inch pan.
Bake for about 45 minutes for two smaller pans, or 55 minutes or more for one large pan, until a toothpick inserted in the center comes out with a few moist crumbs.
Cool the cakes completely in the pans on a wire rack before removing.
For the ganache, place the chopped chocolate in a heatproof bowl. Heat the cream, sugar, and corn syrup (if using) in a small saucepan until just simmering.
Pour the hot cream mixture over the chocolate and let sit for 2 minutes, then stir until smooth. Stir in the butter until glossy. Add sea salt if desired.
Let the ganache cool and thicken slightly to a pourable but coatable consistency.
Place one cake layer on a serving plate. Spread a thin layer of ganache on top.
Add the second cake layer. Pour the remaining ganache over the top, letting it drip down the sides naturally.
Let the ganache set at room temperature or briefly in the fridge before slicing.