Heat the oven to 350°F. Grease and flour two 9-inch round baking pans and line the bottom of the pans with parchment paper for easier removal of the cake. Set aside.
Add the chopped chocolate and oil to a microwave-safe bowl and heat in 30-second intervals, stirring after each one, until the chocolate is melted and smooth. Set aside.
In the bowl of a stand mixer fitted with the paddle attachment or in a large bowl with a handheld electric mixer, beat the butter and sugar together on medium-low speed until light and fluffy, about 5-7 minutes.
Pour the melted chocolate into the butter mixture and beat on medium-low speed until fully combined, about 1 minute.
Beat in the eggs, one at a time, mixing well after each addition. Scrape down the sides of the bowl as needed.
In a medium bowl, combine the flour, baking soda, baking powder, and salt. Stir with a whisk and add to the chocolate mixture. Mix on low until the dry ingredients are almost fully incorporated.
Whisk the water, cocoa powder, and espresso powder together until fully combined
Add the espresso mixture, sour cream, and vanilla to the batter. Beat on medium speed for about two minutes; the batter will be thick and mousse-like.
Pour the batter evenly into prepared pans. Bake in preheated oven for 25 to 30 minutes or until a wooden toothpick inserted in center comes out with a few moist crumbs.
Let the cakes cool in the pans on a wire rack for 10 minutes. Remove the cakes from the pans from pans, discard the parchment paper, and let the cakes cool completely, about 2 hours.
Make the frosting
In the bowl of a stand mixer fitted with the paddle attachment or in a large bowl with a handheld electric mixer, beat the butter until creamy and pale in color, about 5 minutes.
Sift the confectioners' sugar and cocoa powder together in a medium bowl, then add half to the creamed butter and beat on low speed just until the sugar mixture has fully moistened then turn the speed up to medium-high and beat until well incorporated, about 3-5 minutes.
Add the remaining sugar mixture and salt; beat on low speed just until the sugar has fully moistened then turn the speed up to medium-high and beat until well incorporated, about 3-5 minutes.
Stir the cream and vanilla together. With the mixer on low speed add 3 tablespoons to the butter mixture. Turn the speed up to medium-high and beat until the cream is well incorporated, about 3-4 minutes. (after about 2 minutes of mixing, stop to scrape down the sides and bottom of the bowl then continue.)
Check the consistency of the frosting and add more cream if needed, 1/2 a tablespoon at a time. (The frosting should be soft and spreadable but not so loose that it doesn't hold its shape.)
Assemble the cake
Place one cake layer onto a serving platter. Add a generous amount of frosting and spread it to the edge with a spatula. Top with the second cake layer then cover the top and sides of the cake with frosting.
Notes
Instant coffee powder can be used as well.
Plain yogurt or 3/4 cup of buttermilk can be used in place of sour cream.
The butter for the frosting should not be melty. If the softened butter has an oily sheen to it, it's too soft to make buttercream. Pop it in the fridge for a few minutes to firm it up slightly.
Make a three layer cake with three 8-inch round cake pans. Bake them for 20-25 minutes.
Make 24 cupcakes with 2 muffin tins lined with paper liners. Bake them for 15-20 minutes.
Make ahead tip
Wrap baked and cooled cake layers tightly in plastic wrap and store them in the refrigerator. Assemble and frost the cake within 2 days.
Once the cake has been assembled, it will stay fresh for up to 3 days at room temperature or up to 5 days in the refrigerator. Bring to room temperature before serving.
The frosted cake can be frozen for up to 2 months. Thaw it overnight in the refrigerator and let it come to room temperature just before serving.