In a market when many high-flying tech stocks have seen their valuations soar, it's worth taking a look outside of tech for less flashy investments that may be getting overlooked. One industry that hasn't seen the same love from investors that popular tech stocks have is grocery stores.

Sure, grocers are up against some major challenges, namely a rapidly evolving retail landscape and the threat of Amazon's (NASDAQ:AMZN) aggressive foray into the grocery business with its acquisition of Whole Foods. But not all grocery businesses are created equally. Indeed, one continues to look like a grade-A investment and even potentially immune to disruption.

Here are three reasons why Costco Wholesale (NASDAQ:COST) is an attractive long-term investment.

A cart in the aisle of a wholesale store.

Image source: Getty Images.

1. Costco members are loyal.

One thing Amazon has proven is that when memberships truly provide value, they work wonders for customer retention. Getting access to perks like free expedited shipping, a streaming video service, and two million ad-free and on-demand songs, Amazon Prime members have soared, growing about 40% year over year to approximately 90 million members as of Sept. 30, 2017, according to estimates by Consumer Intelligence Research Partners (CIRP). 

Driving home how Prime members believe they receive meaningful value from their memberships, "The share of members that indicate they are likely to renew another year has remained high for several quarters, always comfortably above 90%," CIRP co-founder Mike Levin noted.

But Costco has similarly managed to gain the trust of customers through its memberships. The company boasted an impressive 90.1% membership renewal rate in the U.S. and Canada in its most recent quarter, while renewal rates worldwide were 87.3%. Though Costco requires shoppers to have a membership at its stores, the perk of being a member is straightforward: Costco members can buy quality products at deep discounts.

Driving home how much members love Costco, the company has been able to consistently post strong renewal rates even after a recent membership fee increase. The net result of continued membership loyalty in the face of recent membership increases is an increase of $80 million in membership fees in Costco's most recent quarter. Of this increase in membership fees, $37 million was driven by fee increases.

2. Costco is the king of wholesale.

When it comes to discount wholesale, Costco towers above competition. Even Walmart's (NYSE:WMT) Sam's Club, which is Costco's closest competition, pales in comparison. In Costco's most recent quarter, for instance, its net sales of $32.3 million ($33.0 million when including membership fees) more than doubled Sam's Club's $15.5 million in net sales in Walmart's most recent quarter.

Meanwhile, Costco is doing a better job than Walmart with growing comparable store sales, showing how its lead over Sam's Club is growing. Costco's comparable store sales in its most recent quarter were up 5.4% when excluding fuel sales, while Sam's Club's increased 2.4% when excluding fuel sales.

Being a leader in the wholesale business offers important advantages, as economies of scale is what enables Costco to offer meaningful discounts on its goods and undercut competition. By focusing solely on wholesale, Costco is able to double-down on unit value, selling its groceries at a significant discount to other grocers. Better yet, Costco's ability to deliver value to customers only increases as its business grows.

Further, Costco's leadership in Wholesale is arguably one of the best reasons Costco may be immune to Amazon-like disruption. Differentiating itself from average grocers by selling large-ticket items and groceries in bulk, Costco's average customer purchase is much heavier and larger than purchases from Amazon or Walmart. If expedited shipping does catch on in wholesale, distribution centers will need to be close to customers in order to minimize shipping costs. Fortunately, Costco already has 748 warehouses at an average size of 144,500 square feet each.

A businessperson drawing five stars.

Image source: Getty Images.

3. Costco's valuation looks attractive.

Of course, Costco's unmatched scale in wholesale doesn't automatically exclude it from internet- and expedited shipping-fueled disruption. Amazon has proven customers' enormous appetite for e-commerce in various industries again and again -- and Amazon certainly knows e-commerce best.

Fortunately, this is where Costco stock's conservative valuation comes into play. Trading at 27.5 times earnings, risks associated with an evolving retail landscape seem to be priced in -- especially when considering Costco's business hasn't shown any signs of weakness yet. Costco is charging ahead with comparable sales growth above 5% and a 20% year-over-year increase in operating income in Costco's most recent quarter. Further, it's worth noting that Costco is faring pretty well with its early efforts in e-commerce, growing e-commerce sales approximately 28% year over year in its most recent quarter, or about 35% year over year when excluding the impact from a shift in the timing of pre-Thanksgiving and weekend sales.

Beyond its impressive financial results recently, investors can also take comfort in Costco's strong leadership position in an industry where scale is critical. As Costco grows, its moat widens -- and its moat is already looking insurmountable.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Daniel Sparks has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends Costco Wholesale. The Motley Fool has a disclosure policy.