In a medium mixing bowl, combine the flour, cocoa powder, salt, baking soda, baking powder and ground espresso if using. Set aside.
In the bowl of a stand mixer or a large mixing bowl, cream the butter, brown sugar and granulated sugar. Beat for about 3 minutes.
Add in the egg and mix until well combined. Then mix in the milk and vanilla until well combined.
Add in half the dry ingredients and mix unil just combined, scraping down the sides. Add in the rest of the dry and mix until combined.
Stir in the chocolate chips, pecans and 9 of the chopped caramels. Reserve the other three for topping the cookies with. Cover or seal the dough and chill in the fridge for a minimum of 2 hours and up to 48 hours.
Line or spray a baking sheet and preheat the oven to 350℉. Scoop 2 tbsp size cookies and ensure they're at least 2 inches apart on the pan. Top with the leftover chopped caramel and more chocolate chips if you desire.
Bake for 10-11 minutes until the edges just start to feel firm. Allow to cool on the tray for 5 minutes before transferring to a wire rack. Eat immediately or store in an airtight container for up to 4 days and enjoy!