In a large bowl, whisk together flour, cocoa, baking powder, baking soda, and salt.
Add butter and sugar to bowl of standing mixer. Beat on medium-high speed until very light and fluffy, about 3 minutes. Scrape down sides of bowl then beat in eggs, one at a time, then vanilla. With mixer speed on low, slowly add the flour mixture, and beat until combined. Roll dough between sheets of parchment paper to 1/4" thickness. Chill dough for one hour.
Preheat oven to 375ºF. Cut cough into desired shapes and pop them into the freezer for 10 minutes.
Transfer to parchment-lined baking sheets, leaving 2" space between cookies. Bake about 6 minutes, until slightly puffed and starting to crackle at edges. Cookies should still be soft and slightly underbaked. Transfer to wire racks to cool completely before icing.
Notes
If you use salted butter instead, cut the quantity of salt in half. ROYAL ICING RECIPE: https://foodess.com/royal-icing-recipe/