When food delivery service Grubhub struck a deal with Amazon earlier this month, offering Prime customers a year's free delivery, shares in rivals slumped.

The deal — a lifeline for Grubhub that will increase pressure on its competitors — was the latest example of a meal delivery company taking action to revamp its business in preparation for an anticipated downturn.

The loss-making food delivery sector was one of the big beneficiaries of the COVID-19 pandemic, but that effect has waned as consumers — faced with surging prices — have started to cut back.