Preheat the oven to 350°F (175°C) and line a 12-cup muffin pan with paper liners.
Whisk together the flour, cocoa powder, baking soda, and salt in a large bowl.
In a separate bowl, whisk the egg, sugar, buttermilk, oil, vanilla, vinegar, and red food coloring until smooth.
Gradually add the dry ingredients to the wet mixture. Stir gently until almost combined.
Slowly pour in the hot coffee or hot water while stirring. The finished batter will be relatively thin
Divide the batter evenly between the cupcake liners, filling each about two-thirds full.
Bake for 18 to 22 minutes, or until the tops spring back lightly and a toothpick inserted in the center comes out with a few moist crumbs
Cool the cupcakes in the pan for 5 minutes, then transfer them to a wire rack and cool completely.
For the frosting, beat the softened cream cheese and butter until smooth and creamy.
Add the powdered sugar, cocoa powder, vanilla, and salt. Mix on low speed until combined, then beat until smooth and fluffy.
Add heavy cream or milk a little at a time if the frosting is too thick.
Pipe or spread the frosting over the completely cooled cupcakes.
Finish with red velvet cake crumbs or chocolate shavings, if desired.