Prep your pans and oven. Heat oven to 350°F (175°C). Grease and line three 8-inch round cake pans with parchment. Lightly flour the sides to prevent sticking.
Melt the chocolate. Combine sweet baking chocolate with hot water.
Stir until smooth, then cool to lukewarm. If using espresso powder, mix it into the chocolate.
Mix dry ingredients. Whisk flour, baking soda, and salt in a bowl. Set aside.
Cream butter and sugar. Beat butter and sugar on medium-high until light and fluffy, about 3 minutes.
Add egg yolks one at a time, then vanilla, beating until smooth.
Add chocolate and buttermilk. Mix in the cooled melted chocolate. Add dry ingredients in three parts, alternating with buttermilk, beginning and ending with dry. Mix just until combined.
Whip egg whites. In a clean bowl, beat egg whites to soft peaks.
Gently fold into the batter in two additions for a lighter crumb.
Bake. Divide batter evenly among pans. Bake 22–28 minutes, until a toothpick comes out clean or with a few moist crumbs. Cool in pans 10 minutes, then invert onto racks and cool completely.
Make the coconut-pecan filling. In a saucepan, whisk evaporated milk, sugar, egg yolks, and salt.
Add butter. Cook over medium heat, stirring constantly, until thickened and bubbling, 8–12 minutes. Remove from heat, stir in vanilla, coconut, and pecans.
Let cool to spreadable consistency.
Make the frosting. Beat butter until creamy. Add powdered sugar, cocoa, salt, and vanilla. Beat, adding milk 1 tablespoon at a time, until smooth and spreadable.
Assemble. Place the first cake layer on a stand.
Spread a generous layer of coconut-pecan filling. Top with the second layer and repeat. Add the third layer and spread filling on top.
Use chocolate frosting to coat the sides, or lightly coat the sides and add swirls on top if you prefer.
Set and serve. Chill the cake 20–30 minutes to help it set, then slice with a sharp, warm knife for clean cuts.