Preheat oven to 350°F, 177C, or gas mark 4. Line two 12 cup muffin pans cupcake liners. Set aside.
Whisk the flour, baking soda, cocoa powder, espresso powder, and salt together in a large bowl. Set aside.
In the bowl of a stand mixer with a paddle attachment beat the butter and sugar together on high speed for 3-4 minutes until light and creamy. Add the oil and scrape the sides of the bowl.
Reduce the speed to medium-high and eggs, one at a time waiting a minute between each egg, until combined. Then add the vanilla. Add vinegar and food coloring, you may need to add more to get the desired color.
Reduce the speed to low and alternate adding the dry ingredients with the buttermilk starting with the dry ingredients add 1/3 of the mixture and then half of the buttermilk, mixing until just combined between each addition and scraping the bottom and sides of the bowl as needed.
Transfer batter to the prepared cups and bake for 18-20 minutes or until a cake tester inserted in the center comes out clean with just a few crumbs. Remove from oven and cool completely.
For the frosting
While the cupcakes are cooling in a stand mixer with paddle attachment beat the cream cheese and butter together on high until smooth. Reduce the speed to its lowest setting and add the powdered sugar and milk and mix until incorporated, then increase speed to high and beat until light and fluffy.
Add vanilla and salt and beat again.
To decorate the cupcake place the cream cheese frosting in the piping bag with your desired tip and frost the tops of each cupcake.