Food margins are on average consistently > 66% if not more for many types of restaurants. Delivery services usually pass on costs to consumers (delivery fee + tip) which means they are only removing consumers buying alcohol - but that assumes if delivery were not available that I would go to the restaurant which is false. Delivery is not an alternative to going to a restaurant, it's an alternative to cooking at home.
But this considers only the cost of ingredients. So you'd rather sell a bottle of wine for $15 (that cost $5) than sell a meal for $15 (whose ingredients cost $5).
On your final point, I suspect that delivery via Doordash or similar can take margin that a restaurant's own delivery service (via phoning in) would have made, and that Doordash has inserted itself as an intermediary (with a margin) where none was present before. The pie might be bigger but I'm not sure whether Doordash is capturing less than or more than 100% of the increase.
I owned two QSR franchises (Domino's pizza) for many years and our food cost hovered around 33%. Labor cost was about 22% leaving 45% for fixed cost. Once we got the business going (tripled sales after I took over), our profit was 10% on a good week. That meant a slump in sales, leading to overstating and food being just a bit higher than average and we lost money. It's really hard.