Prep the pan and oven: Heat oven to 350°F (175°C). Grease a 9x13-inch baking pan and line the bottom with parchment for easy removal.
Grate the zucchini: Use the coarse side of a box grater.
Lightly fluff it with your fingers. Do not squeeze out the moisture.
Mix dry ingredients: In a large bowl, whisk flour, cocoa powder, baking powder, baking soda, and salt until well combined and lump-free.
Whisk wet ingredients: In another bowl (or the bowl of a stand mixer), whisk sugars, eggs, oil, yogurt (or sour cream), and vanilla until smooth and glossy.
Combine wet and dry: Add the dry mixture to the wet and stir gently until almost combined. It will be thick—this is right.
Add hot liquid: Pour in the hot coffee or water and whisk just until the batter loosens and becomes smooth. Don’t overmix.
Fold in zucchini and chocolate: Add grated zucchini and chocolate chips.
Fold with a spatula until evenly distributed.
Bake: Pour into the prepared pan and smooth the top. Bake 30–36 minutes, or until a toothpick comes out with a few moist crumbs.
Cool: Let the cake cool in the pan on a rack for at least 30 minutes. Cool fully before frosting.
Make the frosting: Beat butter until creamy.
Sift in cocoa powder; beat to combine. Add powdered sugar, milk, vanilla, and salt. Beat 2–3 minutes until fluffy, adding milk by the teaspoon if needed for spreadable consistency.
Frost and serve: Spread frosting over the cooled cake.
Add a sprinkle of chocolate chips, sea salt, or shaved chocolate if you like. Slice and enjoy.