Preheat the oven to 350°F (175°C). Grease a 9x5-inch loaf pan and line it with a strip of parchment, leaving a bit of overhang for easy removal.
Whisk together the dry ingredients in a large bowl: flour, cocoa powder, baking soda, baking powder, salt, and instant espresso powder. Set aside so the baking powder and soda are evenly distributed.
In a separate bowl, beat the eggs with both sugars until smooth and a little glossy (about 1 minute by hand). Add the oil and vanilla and whisk until fully incorporated.
Pour the wet mixture into the dry ingredients and fold with a spatula just until most of the flour is moistened — avoid overmixing to keep the loaf tender.
Stir the squeezed grated zucchini into the batter until evenly distributed. Fold in the chocolate chips and walnuts (if using). The batter will be thick and slightly glossy.
Transfer the batter to the prepared loaf pan and smooth the top. Bake on the center rack for 50–60 minutes, checking at 50 minutes: a toothpick inserted in the center should come out with a few moist crumbs but not raw batter.
Allow the loaf to cool in the pan for 10–12 minutes, then use the parchment overhang to lift it out and cool on a wire rack. Let it rest at least 30 minutes before slicing so the crumb sets.
Store wrapped at room temperature for up to 3 days, or freeze slices for longer storage. Reheat gently before serving if desired.