Preheat oven to 350°F (177°C). Grease and line two 9-inch cake pans.
In a bowl, whisk flour, cocoa powder, baking soda, baking powder, espresso powder, and salt.
In another bowl, mix oil, sugars, eggs, sour cream, and vanilla until smooth.
Stir in shredded zucchini.
Add dry ingredients and mix until combined. Fold in chocolate chips.
Divide batter between pans and bake for 28–32 minutes until done.
Cool cakes completely before frosting.
For buttercream, beat butter until creamy. Add sugar, cocoa, cream, salt, and vanilla. Beat until smooth.
Assemble cake by layering frosting between layers and covering the top and sides.
Decorate with chocolate chips or sprinkles if desired.
This Chocolate Zucchini Cake is best served at room temperature for maximum moisture and flavor.