Preheat the oven to 350°F and prep two greased, floured, parchment-lined 8-inch pans.
Whisk flour, sugar, baking soda, salt, and espresso powder.
Melt butter with Coca-Cola and cocoa, stir smooth, and pour into the dry mixture.
Whisk in buttermilk, eggs, and vanilla until smooth.
Divide batter into pans, bake 28–32 minutes, cool in pans 10 minutes, then on racks.
Heat butter, Coca-Cola, and cocoa to a gentle boil, remove from heat, add salt, vanilla, and powdered sugar until glossy.
Frost the first layer, add the second, pour remaining warm frosting, and let set 30 minutes.