Grocery stores aren't going away any time soon, but growth in the space is being strangled by competition and commoditization.

In this Industry Focus segment, Motley Fool analysts Dylan Lewis and Michael Douglass explain what investors need to know about buying into grocery stores in this climate. Find out how e-commerce companies such as Amazon.com (NASDAQ:AMZN) and Blue Apron are shrinking grocery store margins, how discount giants such as Aldi and warehouse stores such as Costco and BJ's play into the mix, and more.

A full transcript follows the video.

This video was recorded on July 14, 2017.

Michael Douglass: Never will I ever buy a grocery-store stock again.

Dylan Lewis: Which is to say that you have bought a grocery stock at one point.

Douglass: Yeah. Didn't go so well.

Lewis: Me, too! 

Douglass: [laughs] Interestingly, we bought the same stock. We were actually talking about this particular stock when we were doing New Year's Resolutions Week way back in January. The stock was Whole Foods. I think we both had a thesis that made a lot of sense at the time about it, which was that you have a strong brand, enable them to charge a premium, and they had a lot of growth, both same-store and also in terms of store count. And that thesis largely fell apart over the last three years. Very fortunately, Amazon came in and bought up Whole Foods, so a lot of people recouped some of their losses, maybe even made a gain. You and I had both sold before then, so we didn't, which is fine.

Lewis: There's a separate lesson there.

Douglass: Yeah, we're not bitter. [laughs] But when thinking about grocery stores at a whole, first off, I do recognize that they are consumer-goods companies, maybe not tech companies, but there's a tech angle here.

Lewis: We're going to bring it around.

Douglass: We'll get there. But grocery stores are low-margin businesses because they're so darn commoditized. Sure, there are tiers of stores. Harris Teeter and Wegmans operate on a different paradigm in a lot of ways than the giant Kroger and Food Lion, and then you have your true discounters like Aldi. But they're in competition with so many other businesses. Think retail pharmacies like CVS and Walgreens, think dollar stores, big-box stores like TargetWal-Mart, the warehouse clubs like Costco and BJ's. You just have a ton of competition, and that's a good thing for consumers. It's a bad thing for margins.

Lewis: Yeah, it's really tough to make the numbers work, particularly when you can buy a bunch of bananas or Life cereal at most grocers. It's kind of hard to charge much more for it than the place down the street is.

Douglass: Yeah. You can get a little bit on specialty products, like a particularly nice cheese or something like that, but that's not where most of your volume is going to come from. It's going to come from stuff like milk.

Lewis: And you mentioned that we were going to bring this around to tech. I'm going to try to do it here. [laughs] 

Douglass: Do it. Here we go. Turn the ship. 

Lewis: You talked about Amazon's acquisition of Whole Foods. I do not think the grocery business is going away anytime soon.

Douglass: No.

Lewis: Particularly for things like milk, I think people are going to be happy to go to the store and actually grab things they need quickly. But if a business is super low-margin, and someone can come in and totally disrupt it by being more convenient, that's a red flag. Just keep that in mind as these tech companies continue to get into further-afield businesses from whatever their core competencies are. I think that's one of the big lessons from the Amazon-Whole Foods acquisition.

Douglass: And one of the key things to think about with an Amazon or Blue Apron or some of these other companies that are operating in this space, and are frankly disrupting -- Amazon Fresh, Amazon delivery, if they're able to really win at that, that could be enormous -- is that they have a footprint advantage. They don't have to operate all of this really expensive retail space. That gives them a cost advantage. If something is low-margin and kind of commoditized, a low-cost operator wins. That could end up being somebody like an Amazon. Now, today, tomorrow, five years from now, hard to say. That's not to say -- again, I would agree with you, I don't think grocery stores are going out of business. But there's a difference between surviving and prospering.

Lewis: Exactly, when you're thinking about market-beating returns.

Douglass: Right. We're in the stock market because we want to win, we want to make money. Plenty of companies plod along and survive; relatively few prosper. I think, for me, that's the kind of investing that I want to do. And hopefully you're listening to the Tech show because you do, too.

Lewis: Yeah. One more point on that -- I think for Amazon or any of these big tech companies, to offer more products that roll people into a membership-type option, it's peanuts for them. They are happy to offer groceries at super low margin because they already have logistics that are built out to work with all that fulfillment. If it means they get more people into their Prime ecosystem, they're psyched about it. If you're competing against super-deep-pocketed competitors, and it doesn't really cost much for them, and it's no skin off their nose to enter that market, that's kind of dangerous.

John Mackey, CEO of Whole Foods Market, is a member of The Motley Fool's board of directors. Dylan Lewis owns shares of Amazon, Costco Wholesale, and Whole Foods Market. Michael Douglass owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon and Whole Foods Market. The Motley Fool recommends Costco Wholesale and CVS Health. The Motley Fool has a disclosure policy.