1 1/2cups (3 sticks) unsalted butter, room temperature
3/4 teaspoon flaky sea salt (such as Maldon)
Extra-virgin olive oil (for drizzling; optional)
Three 8 -diameter cake pans
Preheat oven to 325 . Lightly coat cake pans with nonstick spray and line bottoms with parchment paper; spray again. Whisk flour, cocoa powder, baking powder, baking soda, and salt in a medium bowl.
Using an electric mixer on high speed, beat eggs and sugar until pale and doubled in volume, about 4 minutes. Add mayonnaise and vanilla and beat until just combined. With mixer on low speed, add dry ingredients in 3 additions, alternating with 1 1/3 cups lukewarm water in 2 additions, beginning and ending with dry ingredients. Scrape batter into pans, dividing evenly.
Bake cakes, rotating halfway through, until a tester inserted into the centers comes out clean, 25–30 minutes. Transfer pans to wire racks and let cool 20 minutes before turning out onto racks. Let cool completely.
Frosting and assembly
Put chocolate in a medium bowl. Bring sugar, corn syrup, and 1/4 cup water to a boil in a small saucepan over medium-high heat, stirring to dissolve sugar. Boil, swirling pan occasionally and brushing down sides with a wet pastry brush, until mixture turns a deep amber color, 10–12 minutes. Remove from heat and whisk in cream (mixture will bubble vigorously). Return to medium heat and cook, stirring, until smooth, about 2 minutes. Pour caramel over chocolate and stir until mixture is smooth; let cool, stirring occasionally.
Using an electric mixer on medium-high speed, beat chocolate mixture, gradually adding butter, until frosting is thickened and smooth, about 1 minute. Chill, stirring occasionally, until stiff enough to spread easily, 20–25 minutes.
Place 1 cake layer on a cake stand or platter. Spread 1 cup frosting over to come just beyond edges. Sprinkle with 1/4 tsp. salt and place second cake layer on top, pressing down gently. Repeat process with 1 cup frosting and 1/4tsp. salt. Place third layer on top, and spread remaining frosting over top and sides of cake.
Just before serving, sprinkle remaining 1/4tsp. salt over top of cake; drizzle slices with oil, if desired.
DO AHEAD- Cake can be made 1 day ahead. Cover and chill.