Preheat the oven to 350°F (177°C). Grease two 9-inch round cake pans, line with parchment rounds, then grease the parchment.
Whisk together the flour, cocoa powder, baking soda, baking powder, espresso powder, and salt in a bowl. Set aside.
In a separate large bowl, beat the oil, granulated sugar, brown sugar, eggs, sour cream, and vanilla extract until combined.
Add the shredded zucchini to the wet ingredients and mix until evenly incorporated.
Add the dry ingredients to the wet ingredients and mix on medium speed until just combined.
Fold in the chocolate chips.
Divide the batter evenly between the prepared pans.
Bake for 28–32 minutes, until a toothpick inserted into the center comes out clean.
Cool the cakes in their pans for 1 hour, then transfer to a wire rack to cool completely.
For the frosting, beat the softened butter on its own for about 2 minutes until smooth.
Add the confectioners' sugar, cocoa powder, 3 tablespoons of heavy cream, salt, and vanilla extract.
Beat on low speed for 30 seconds, then increase to high speed until light and fluffy. Add more cream as needed for a smooth, spreadable consistency.
Level the tops of both cake layers if needed. Place the first layer on a cake stand and spread about 1 cup of frosting evenly over the top.
Add the second layer, then frost the top and sides of the cake.