The retail apocalypse has wiped out thousands of stores over the past decade, due to the over-expansion of malls, cascading damage from the 2008-09 Great Recession, and competition from superstores and online marketplaces. The coronavirus pandemic accelerated that meltdown this year, and forced even more retailers, including JCPenney and Neiman Marcus, to file for Chapter 11 bankruptcy protection. The retail situation seems dire -- but not all retailers are being crushed.

Let's examine three large-cap retail stocks that are bucking the secular decline -- Amazon (NASDAQ:AMZN), Best Buy (NYSE:BBY), and Target (NYSE:TGT) -- and see why they belong in your portfolio.

A vacant commercial lot with an empty parking lot.

Image source: Getty Images.

1. Amazon

Amazon's expansion is often cited as a root cause of the retail apocalypse, and it continues to benefit from closures of brick-and-mortar stores. It could account for nearly 40% of all U.S. e-commerce sales next year, according to eMarketer, which makes it the undisputed king of online retail.

The firm also estimates e-commerce sales will account for 14.4% of all U.S. retail sales in 2021, and that percentage could rise to 18.1% by 2024. That upward slope indicates Amazon, which ended last year with 150 million paid Prime members worldwide, still has room to grow.

The pandemic pushed many brick-and-mortar retailers over the brink this year, but it lit a fire under Amazon's e-commerce and cloud businesses as more people shopped online and accessed Amazon Web Services (AWS)-powered websites and services.

AWS' higher-margin revenue continues to subsidize the growth of Amazon's lower-margin marketplaces, which enable it to consistently widen its moat with aggressive discounts and ecosystem-expanding strategies.

As a result, Amazon's revenue rose 35% year over year in the first nine months of 2020 as its earnings surged 68%. Wall Street expects its revenue and earnings to rise 35% and 52%, respectively, for the full year. Amazon's stock is still reasonably valued at 58 times forward earnings, and the so-called "Death Star" of retail will crush more brick-and-mortar retailers in the near future.

2. Best Buy

Back in 2012, Best Buy seemed fully exposed to the retail apocalypse. Shoppers were using its stores as "showrooms" to test out products they would later purchase on Amazon, its sales were declining, and its CEO Brian Dunn abruptly resigned due to an inappropriate relationship with an employee.

But Dunn's successor, Hubert Joly, turned around the retailer by fixing broken inventory systems, investing in better employee training, matching Amazon's prices, and embracing its reputation as a showroom by renting out its floor space to top brands like Apple. It also expanded its e-commerce platform and turned its network of brick-and-mortar stores info fulfillment centers for online orders.

Under Joly's seven-year tenure, which ended last June, Best Buy's stock rallied 260% as it won back shoppers. Joly's successor, Corie Barry, stuck to that playbook to help Best Buy weather the pandemic.

Barry kept Best Buy's stores open, kept its e-commerce and delivery systems running, and made sure it was stocked with enough PCs and accessories to keep pace with the shift toward remote work and online learning.

As a result, Best Buy's domestic digital comps surged by triple-digit percentages in the first half of the year. Its total revenue dipped 1% year over year due to store closures in the first quarter, but analysts expect its revenue and earnings to grow 5% and 19%, respectively, this year as its sales accelerate through the busy holiday season.

In addition to being a retail apocalypse-proof stock, Best Buy still looks cheap at 18 times forward earnings, and it pays a decent forward dividend yield of 1.9%.

3. Target

Like Best Buy, Target once fell victim to the retail apocalypse. When Brian Cornell took over as CEO six years ago, Target's comps growth was soft, it was struggling to keep pace with Amazon and Walmart (NYSE:WMT), and it was racking up losses from an ill-advised expansion into Canada.

A Target store.

Image source: Target.

But Cornell gradually turned around Target by renovating the retailer's aging stores, launching smaller-format stores for urban areas, and introducing dozens of private-label brands to expand its margins and differentiate the chain from the competition.

Target expanded its e-commerce ecosystem with more delivery and pick-up options and turned its brick-and-mortar stores into fulfillment centers for those online orders. It matched Amazon and Walmart's prices and locked in shoppers with its new Target Circle loyalty program.

It also continued to expand its store count every year even as other retailers closed down. As a result, 75% of the U.S. population now lives within 10 miles of a Target store.

Target's improved scale enabled it to gain a lot of shoppers during the pandemic. Its total revenue rose 19% year over year in the first nine months of 2020, with triple-digit digital comps growth in the second and third quarters, and its earnings per share rose 25%.

Analysts expect Target's revenue and earnings to rise by 18% and 42%, respectively, this year. Target's growth should decelerate next year if the pandemic ends, but it's still reasonably priced at 22 times forward earnings. Moreover, Target pays a forward dividend yield of 1.6%, and it's raised its payout annually for 49 straight years -- which will make it a Dividend King if it hikes its dividend again next year.