However, there's more. Retail isn't solely defined by low margin businesses like buying canned food and imported low-grade durable consumer goods (e.g. the walmart/target scenario). In many parts of the country there is a trend toward high-end "boutique" shops of various sorts. In my town, Seattle, there has been an explosion of neighborhood butchers offering organic, grass-fed beef et al. But the same sort of principles apply to lots of different businesses.
If your core business is about getting interchangeable mass produced goods into people's hands you are going to lose out to the big boxes and to the amazons. If your core business involves a lot of customer interaction or requires special skillsets or can be decommoditized in some way then perhaps you'll do ok, both online and off.
Trying to compete on amazon's playing field is a non-starter, so the trick is playing on a different field.
I think we forget how many people are employed in retail jobs across the US. In 2010, 14 million people were involved in the retail industry. As retail efficiency improves via WalMart/Amazon/Target, this employment will drop. And as a society, we aren't very good at forecasting where jobs will migrate.
Competition/efficiency helps consumers by lowering prices, but the job loss should be troubling.
The only outlier I see in retail is Apple, generating huge amounts of revenue from their physical stores.