Place a rack in middle of oven; preheat to 350°. Lightly coat a 9"-diameter cake pan or 8x8" baking pan with nonstick vegetable oil spray; line with a parchment paper round if using a cake pan or a sheet of parchment if using a square pan.
Whisk together sugar, flour, cocoa powder, 2 tsp. salt (Diamond Crystal), and baking soda in a bowl.
Add eggs, buttermilk, ½ cup olive oil, vanilla extract, and ¾ cup water; whisk until smooth.
Scrape batter into prepared pan and bake cake, rotating pan halfway through, until a tester inserted into the center comes out with just a few moist crumbs attached, about 38-45 minutes.
Transfer pan to a wire rack and let cake cool in pan 15 minutes. Turn out cake onto rack and let cool completely.
For the frosting, melt chocolate, ¼ cup olive oil, 1 Tbsp vanilla, ¾ tsp. Diamond Crystal salt, and ½ cup water water in the microwave in 20 second bursts, stirring after each burst, until chocolate is melted. .
Vigorously whisk mixture until mostly smooth; mixture will look oily and broken, but that is okay. (Alternatively, heat in a heatproof bowl set over a saucepan of simmering water, whisking until melted and mostly smooth. Do not let bowl touch water.) Add 2 cups (220 g) powdered sugar and whisk until dissolved and mixture is completely smooth. Chill, stirring with a rubber spatula every 5 minutes to promote even cooling, until frosting is room temperature and looks like soft fudge, about 20 minutes. (Frosting needs to be room temperature to swoosh properly. If it gets too cold, microwave 5 seconds and stir to thin out.)
Place cake upside down on a cake stand or plate. Spread frosting on the cake and sprinkle with flaky sea salt.
Serve by cutting into slices and drizzling with olive oil if desired.
