We are undergoing a huge change. It makes no sense whatsoever to look at distribution centers and retail stores and weight jobs against each other as we are in a transition period. A lot of retail these days is loosing money and the jobs in these businesses may go away. There is a glut in retail space (particularly in the US but also elsewhere) but asking rents take a while to go down. At the same time real estate in general still moving up or at least sideways. The new distribution centers may have a fair number of well paying jobs but how much of it is transitory too? At the moment this is where the investments flow but a lot may well be one-offs.
Retail is revolutionized. Online has reached a market share where there is material impact on brick-and-mortar stores and the ecosystem around them. Shop-floor salespeople and rents are for many products too expensive to compete with online on price. Companies are also moving more towards direct sales to customers cutting out middle layers to be able to control pricing better and protect the traditional shop - although that only works for products with clear USP. Traditional shop use has to change and provide more value than just transactional selling. Some are distributing directly and combine it with services (Apple) or are may be only showing stuff (Tesla). Showing tangible products is still important but unless it is so important that manufacturers are willing to pay for it then it won't happen anymore. I suspect a lot of space is going to be freed up the coming years and one can only hope new constructive uses will be found.
Real estate, profit, and salaries/bonuses to executives are all diminishing the wage/quantity of workers in retail and can more easily be cut in online markets where independent merchants need low capital. So independent merchants might be making more money from their own direct labor than the corresponding retail workers.
They rarely amount to much more than jobbers.
I worked at CompUSA in the mid 90s, which was a big box format computer store similar in size to a Bed Bath and Beyond or Staples. We had like 75-100 employees, 5-7 were salaried, and only 15-25 were full time. Most part-timers worked 25-28 hours a week. (They wanted to avoid state health insurance requirements which kicked in at 30)
I don't think that Amazon is replacing those manhours 1:1. I'd guess that they need 1/5 of the manhours. Most of the supporting people (UPS, FedEx, LTL freight, soda machine guy, cleaners) are a wash between retail and ecommerce.
The retail->logistics displacement hurts a lot of marginal workers like kids, single mothers and others. It also creates a permanent underclass of temp workers who as contractors will always be treated worse than employees. There isn't much of that in retail.