Heat the oven to 350°F (177°C). Grease two 9-inch round cake pans and line the bottoms with parchment; grease the parchment as well. Set a wire rack nearby.
Shred the zucchini on the large holes of a box grater or in a food processor. Transfer to a clean kitchen towel and press lightly to remove excess water — you want moist shreds, not dripping. Measure about 3 cups (about 360 g).
In a large bowl whisk together the flour, cocoa, baking soda, baking powder, salt, and cinnamon until evenly combined. Set aside.
In the bowl of a stand mixer fitted with the paddle attachment (or using a handheld mixer), combine the oil, granulated sugar and brown sugar. Mix on medium speed until the sugars are fully moistened, about 30–45 seconds. Add the eggs one at a time, mixing briefly after each addition. Scrape down the sides.
Mix in the sour cream and vanilla until smooth, then fold in the shredded zucchini by hand so the pieces stay distributed without overworking the batter.
Add the dry ingredients to the wet mixture in two additions, mixing on low speed just until no streaks of flour remain. Fold in the chocolate chips with a spatula. The batter will be relatively thick.
Divide the batter evenly between the prepared pans, smoothing the tops with an offset spatula. Bake in the center of the oven for 32–36 minutes, rotating pans halfway through, until a toothpick inserted near the center comes out with a few moist crumbs attached.
Allow the cakes to cool in the pans for 15 minutes. Run a thin knife around the edges and invert each layer onto a wire rack. Remove parchment paper and let layers cool completely, about another 45–60 minutes. For firmer layers (easier to frost), chill the cooled layers in the refrigerator for 20 minutes before assembling.
While the cakes cool, make the buttercream. Beat the softened butter on medium speed until creamy and slightly paler, about 2–3 minutes. Reduce speed to low and add half the powdered sugar and all the cocoa; mix briefly to incorporate. Add 3 tablespoons heavy cream, the vanilla and salt, then add the remaining powdered sugar. Increase speed to medium-high and beat until smooth and fluffy, adding up to 1 more tablespoon cream if the frosting seems too stiff.
Trim the rounded top off each cake layer with a large serrated knife to create level surfaces. Place one layer on your serving plate, spread about 3/4 to 1 cup of frosting evenly over it. Top with the second layer.
Apply a thin crumb coat of frosting over the top and sides, then chill the cake 10–15 minutes to set the crumb coat. Finish by spreading the remaining frosting smoothly over the cake. Use any leftover buttercream to pipe a rim or rosettes; sprinkle extra chocolate chips or sprinkles if desired.
Let the frosted cake sit at room temperature for 30 minutes before slicing for cleaner cuts, or refrigerate for up to 1 hour to firm the frosting. Store covered at room temperature up to 2 days, or refrigerate up to 5 days.