Preheat your oven to 350°F (175°C) and line the bottom of a 9x13-inch baking pan with parchment paper.
In a microwave-safe bowl, combine chocolate and water and heat on high until melted and smooth, about 1 1/2 to 2 minutes, stirring once halfway; set aside.
In a medium bowl, mix together flour, baking soda, and salt.
In a large bowl, cream together sugar and butter with an electric mixer until light and fluffy.
Add egg yolks one at a time, beating well after each addition, then stir in melted chocolate and vanilla until fully incorporated.
Add the flour mixture alternately with buttermilk, mixing until smooth after each addition.
In a separate clean bowl, beat the egg whites until soft peaks form, then gently fold them into the batter.
Pour the batter into the prepared pan and bake for about 30 minutes, or until a toothpick inserted in the center comes out clean.
Allow the cake to cool completely on a wire rack.
For the frosting, in a large saucepan, combine milk, sugar, butter, egg yolks, and vanilla.
Cook over medium heat, stirring constantly, until the mixture is thick and golden brown, about 12 minutes.
Remove from heat and stir in coconut and pecans.
Let the frosting cool to room temperature—it will thicken as it cools.
Once the cake is completely cool, spread the frosting evenly over the top.