You may be underestimating the 'carbon footprint' of retail shopping; I have never seen a clear comparison of the two, but I am not sure one would be significantly 'better' than the other.
Everyone knows that online shopping is much worse in terms of footprint. First, think of all the items that are returned. Second, think of the incentive it creates to buy more stuff.
Do you have any idea of how many emissions are caused by people driving 'across town' to buy very little? What about people who drive to the store to buy one thing? How about the air conditioning in the mall?
Warehouses are much more efficient places to store things than malls and stores.
Consumers are very bad at logistics, whereas logistics companies (like couriers) are very efficient at logistics.
I am not sure which mode of shopping is more 'energy intensive', I'm just pointing out reasons why online shopping may not be worse than retail shopping.
It's not just about the energy per delivery. It's more about the enormous extra amount of stuff we are buying since online shopping and online advertising became a thing.
What if online (and retail) shopping was more expensive the farther it had to be transported from? Some things would be expensive enough for local businesses to make a profit.