Preheat the oven to 350 degrees F. Lightly grease 2 cookie sheets. Sift the flour, baking soda, and cocoa together in a large bowl. In a separate bowl, combine the oil, vinegar, food coloring, and vanilla.
Using an electric mixer, beat the sugar and eggs together in a large bowl until they turn pale and double in volume. Add the oil mixture and beat to combine. Add the flour mixture and buttermilk alternately in 5 small additions, starting and ending with the flour.
Drop the batter by teaspoons onto the baking sheets, allowing 1-inch between drops, as the cookies will spread. You'll be making 48 cookies. Bake until the cookies are firm but not crisp, about 8 to 10 minutes. Transfer immediately to racks to cool.
Put the flour into a medium saucepan and slowly add the milk, whisking until smooth. Set over medium heat and cook, stirring constantly with a whisk, until very thick, about 3 minutes. Remove the flour mixture from the heat and allow it to cool completely.
Cream the sugar, butter, shortening, and vanilla in a large bowl with an electric mixer. Add the cooled flour mixture and whip until fluffy. Spread some filling onto 1 cookie and top it with another to make a sandwich. Repeat with the remaining cookies and filling. Cover the filled whoopee pies with plastic wrap and store in the refrigerator until ready to serve.