Retailers ramp up automation in race for survival