For the cake: Preheat the oven to 350 degrees F. Spray a 9-by-13-inch baking pan with baking spray.
Whisk together the flour, cocoa powder, baking soda and salt in a medium bowl and set aside. In a small bowl, stir together the buttermilk, food coloring, vanilla and vinegar and set aside. In the bowl of a stand mixer fitted with a paddle attachment, or using a hand mixer and a large bowl, beat the oil, butter and granulated sugar on high speed until light and fluffy, about 2 minutes. Add the eggs, one at time, beating well after each addition. Scrape the bottom of the bowl with a rubber spatula and briefly beat again to ensure everything is combined.
Alternate adding the flour mixture and the buttermilk mixture in three parts and beat just until everything is combined. Pour the batter into the prepared pan, spreading it evenly and into the corners using a large offset spatula or knife. Bake until a toothpick inserted in the center comes out clean, 30 to 35 minutes. Cool completely in the pan, about 35 minutes.
For the frosting: Meanwhile, in the bowl of a stand mixer fitted with the paddle attachment, or using a hand mixer and a large bowl, beat the butter and salt on high speed for 1 minute. Add the cream cheese and beat until combined and fluffy, about 1 minute. With the mixer on medium speed, beat in the confectioners’ sugar in 3 additions until combined. Beat in the vanilla until combined. If the frosting is too stiff, beat in the heavy cream, as needed.
When cake is completely cool, spread the frosting evenly over the top using a large offset spatula or knife. Sprinkle with the pecans, if you like.