Whisk the eggs in a medium saucepan, then gradually whisk in the evaporated milk.
Whisk in the sugars, butter, and salt.
Cook over medium-high heat, whisking constantly, until the mixture is boiling, frothy, and slightly thickened, about 6 minutes.
Transfer the mixture to a bowl and whisk in the vanilla. Stir in the coconut and pecans.
Let cool until just warm, then refrigerate until cool, about 2 hours.
Make the Cake
Adjust the oven rack to the lower third, just below the center of the oven, and heat to 350°F. Grease two 9-inch round cake pans, line with parchment paper, grease the parchment paper, and flour the pans. Tap out any excess flour.
Add chopped chocolate and cocoa to a bowl. Bring the milk to a simmer in a small saucepan, take care not to boil. Pour the hot milk over the chocolate and cocoa and let sit for 5 minutes. Whisk until the mixture is melted and smooth. Let cool completely.
In a separate bowl, whisk the flour and baking soda together; set aside.
Using a stand mixer fitted with the paddle attachment, or a handheld electric mixer, beat the butter, both sugars and salt on medium-high speed until light and fluffy, about 3 minutes.
Add the eggs, one at a time, beating well after each addition.
Add the vanilla, increase the speed to medium-high, and beat until light and fluffy, about 45 seconds.
Reduce the speed to low and add the cooled chocolate mixture. Then increase the speed to medium and beat until combined, about 30 seconds. Stop to scrape down the sides and bottom of the bowl. The batter may look curdled at this point, this is normal.
Add half the flour mixture and mix on low speed until almost fully incorporated. Add the sour cream and mix until well combined. Then add the remaining flour mixture and mix just until combined.
Scrape down the sides of the bowl and give the batter a final stir. The batter will be thick.
Divide the batter evenly between the prepared pans and smooth the tops with an offset spatula. Gently tap the pans on the counter to settle the batter.
Bake for 25-30 minutes, until a toothpick inserted into the center comes out clean.
Cool the cakes in the pans for 10 minutes then transfer to a wire rack to cool completely.
Assemble the Cake
Level the tops of each cake layer. Place one cake layer on a cake stand or large serving plate and top with half of the frosting. Spread the frosting into one even layer.
Place the second cake layer on top of the frosting, add the remaining frosting on top, and spread it into an even layer.
Notes
Use room temperature ingredients. Allow all the cold ingredients to sit on the counter for 30-45 minutes before using them. It really makes a difference!
Make ahead tips
Store the cake in an airtight container in the refrigerator for up to 4 days.
Cake layers can be stored at room temperature for up to 24 hours or frozen for up to 1 month. Thaw at room temperature before using.
The frosting can be made up to 3 days in advance. Keep refrigerated until ready to use.