Preheat oven to 350°F (175°C) and line a 12-cup muffin pan with cupcake liners.
In a medium bowl, whisk together flour, salt, baking powder, baking soda, cocoa, and espresso powder. Set aside.
In a large bowl, beat butter and sugar until light and fluffy, about 2 minutes.
Add eggs one at a time, beating well after each addition. Mix in vanilla extract.
Alternate adding dry ingredients and milk to the butter mixture, starting and ending with dry ingredients. Mix until just combined.
Divide the batter evenly among cupcake liners, filling each about 2/3 full.
Bake for 18–20 minutes, or until a toothpick inserted into the center comes out clean. Cool completely before frosting.
To make frosting: Beat butter and brown sugar together until creamy. Add flour, powdered sugar, salt, and vanilla, mixing until smooth.
Add milk as needed for a fluffy, spreadable consistency.
Frost cupcakes generously and top with mini chocolate chips if desired.