Preheat your oven to 350°F.
Grease pans. Line with parchment paper.
Mix flour, cocoa, sugar, powder, soda, and salt.
Add eggs, oil, buttermilk, and vanilla. Mix well.
Slowly add hot water. Stir until smooth.
Pour batter evenly into prepared pans.
Bake 30–35 minutes. Insert toothpick to check.
Cool cakes on a rack for 10 minutes.
Remove cakes and cool completely.
For frosting, combine milk, sugar, yolks, and butter.
Cook over medium heat, stirring constantly, 12 minutes.
Remove from heat. Stir in coconut, pecans, and vanilla.
Let frosting cool until thickened but spreadable.
Level cakes if needed. Stack and frost layers.
Use extra frosting to cover top and sides.
Chill before slicing for neat, clean cuts.