Preheat the oven to 350F and prep two 8 inch cake tins with cooking spray and baking parchment.
In a large bowl, whisk together the flour, sugars, cocoa, baking powder and baking soda. Set aside.
In another bowl or a large jug, whisk together the buttermilk, oil, vanilla and the eggs until smooth. Pour the wet ingredients into the dry, and whisk until you have a thick batter.
Add the boiling water and whisk into the cake batter before dividing it between the two tins - use a pair of kitchen scales if you have them to get even layers.
Gently lift each tin a few inches off the countertop and drop them back down a few times to knock out any air bubbles before baking for 30 minutes, or until the cakes are set and the tip of a sharp knife or a cocktail skewer inserted into the middle comes out clean. Cool completely on a wire rack.
While you are baking and cooling the cakes, make the frosting. First, melt the butter in a small saucepan over a medium high heat until it is nutty and brown. Remove from the heat to cool.
In another, much larger saucepan, add the egg yolks and gradually whisk in the milk until smooth. Then whisk in the sugars, heavy cream, salt, and cooled brown butter.
Set the pan over a medium heat and cook, whisking almost constantly once the mixture has started to warm until it has thickened, and you’ve started to see a few bubbles. It is ready if it coats the back of a spoon, but whatever you do don’t let it boil!
Remove the pan from the heat and whisk in the vanilla and coconut rum, if using. Switch to a spatula, and fold in the coconut and chopped pecans. Set aside - it will thicken once it has cooled.
Once the cakes have reached room temperature and the frosting has thickened, using a large bread knife or a cake leveller, split each layer in two, and sandwich each together with 1/4 of the frosting, leaving the remaining frosting to decorate the top of the cake.