In the bowl of a stand mixer (or a large mixing bowl with a hand mixer), beat the butter and sugars until light and fluffy, about 4 minutes.
Add in eggs, one at a time, mixing well after each addition. Add vanilla and espresso powder, mix until combined.
In a medium mixing bowl, whisk together the cocoa powder, flour, baking soda, and salt. With mixing speed on low, gradually add the dry ingredients. Mix until a soft dough forms.
Cover the dough with plastic wrap and refrigerate for at least 1 hour. Refrigerate dough for one hour.
Preheat oven to 350 degrees. Line a baking sheet with parchment paper or silicone baking mats, set aside.
Using a standard size cookie scoop (#40 or 1.5 tablespoons), scoop dough and roll in the granulated sugar, if desired. Place on prepared sheet, then bake for 8-10 minutes. The cookies should be soft in the center but set on the edges.
Remove from the oven and allow the cookies to cool on the sheets for 5 minutes before transferring to a wire rack to cool completely.