Preheat the oven to 350°F/175°C (fan 330°F/165°C) and line two baking sheets with parchment paper. Also, have a baking spray or oil and an ice cream scoop (or tablespoon) ready for later. Set aside.
In a heatproof medium-sized bowl, add chocolate and butter and melt in the microwave. Stir every 20 seconds to avoid the chocolate from burning. Then add the cocoa and espresso powder, if used, and whisk to combine. Let sit for 5 minutes.
In a large mixing bowl, using an electric mixer fitted with a whisk or paddle attachment, mix the egg, sugar, and brown sugar on medium-high speed until pale and creamy, about 2-3 minutes. Add the vanilla, oil, and chocolate mixture and mix until well combined, about 1 minute. Then mix in the flour, baking powder, and salt on medium-low speed just until it comes together and it's a smooth texture, about 30-60 seconds. Add the chopped chocolate or chocolate chips and mix to combine. Set aside.
Lightly coat the inside and outside of a cookie scoop with baking spray or a few drops of oil and scoop dollops of cookie dough (about 2 tablespoons) 4-inch (10cm) apart onto the prepared baking sheets and bake one sheet at a time for 8-9 minutes until the top of the cookies has little cracks all over.
Remove from the oven and let cool on the sheet for 5 minutes or until they are firm enough to move them. Then transfer them to a cooling rack and let cool completely. Store them in an airtight container at room temperature for up to 4 days or freeze for up to 3 months.