Adjust the oven rack to the middle position and heat the oven to 350 degrees.
Grease two 9-inch or three 8-inch round cake pans, line with parchment paper, grease parchment, and flour pans.
Whisk flour, baking soda, baking powder, and salt together in bowl.
In a second bowl, whisk boiling water, chocolate, cocoa, and espresso powder together until smooth.
Using a stand mixer fitted with a paddle attachment, beat butter and sugar on medium-high speed until pale and fluffy, about 3 minutes.
Add eggs, one at a time, and beat until combined.
Add sour cream and vanilla and mix until incorporated.
Reduce speed to low and add the flour mixture in 3 additions, alternating with chocolate mixture in 2 additions, scraping down bowl as needed.
Give the batter a final stir by hand.
Divide the batter evenly between the prepared pans and smooth the tops with a rubber spatula.
Bake until a toothpick inserted in the center comes out clean, 15 to 20 minutes (for 8-inch pans) or 25 to 30 minutes (for 9-inch pans), rotating pans halfway through baking.
Let the cakes cool in the pans on a wire rack for 10 minutes.
Remove the cakes from the pans, discarding parchment, and let cool completely on rack, about 2 hours.