One way for companies to bring more traffic to their stores is to provide services that customers can't get from an online retailer like Amazon (AMZN 1.49%), which could otherwise easily steal sales away from brick-and-mortar shops. Healthcare could provide such an opportunity, with CVS Health (CVS -0.17%) and Walgreens Boots Alliance (WBA -0.11%) making moves in recent years to make it easier for customers to take care of common health issues at their pharmacies rather than having to go to a primary care provider.

But there isn't a huge barrier to entry for a store to also offer healthcare services, and that can result in some intense competition. Big-box retailer Walmart (WMT 1.02%) has gotten into the mix and has begun offering healthcare services at some of its stores. And that's not the only big retailer that CVS and Walgreens need to worry about.

Dollar General is piloting mobile clinics

At more than 18,000 stores in the country, Dollar General (DG -1.36%) is a major retailer that customers turn to when looking to save money on popular brands. It's a trusted neighborhood store that is now planning to give customers even more of a reason to visit -- to gain access to healthcare services.

Currently available at three Tennessee locations, Dollar General is piloting mobile health clinics (which are in vans) available right outside its stores. Dollar General has partnered with mobile health company DocGo (DCGO -1.68%) to provide the services. People will have access to preventative care services such as routine checkups and immunization. They will also have access to urgent care services (e.g., migraines, cold, flu, and skin issues) and be able to treat chronic conditions such as high blood pressure and diabetes. Walk-ins are available, and people can also book an appointment.

If successful, it could lead to more such clinics. And with a large presence across the country, Dollar General could be a much bigger threat to CVS and Walgreens in the future.

Dollar General already provides customers with access to healthcare products, and in 2021 it hired a chief medical officer, Dr. Albert Wu, as part of a larger step to move into healthcare. Then-CEO Todd Vasos stated, "our goal is to build and enhance affordable healthcare offerings for our customers, especially in the rural communities we serve."

Why CVS and Walgreens should be worried

Pharmaceutical retailers CVS Health and Walgreens have been working on expanding more into healthcare in recent years. CVS has been launching HealthHubs at its stores so that customers can access affordable healthcare services while at its locations, including getting care for chronic conditions. Walgreens, meanwhile, has also been making a similar push into healthcare and has invested billions in primary care company VillageMD in an effort to launch 1,000 clinics at its stores by 2027.

Healthcare is a big growth opportunity for both companies, and Dollar General is just the latest threat that the businesses will have to worry about. And with Dollar General focusing on low prices and often offering significantly cheaper products than drugstores, it can be an attractive one-stop shop for consumers. Dollar General also isn't the only threat for the pharmacy retail giants, as Walmart has also been launching health clinics that are available in 30-plus locations. But by 2029, the company plans to have 4,000 clinics. 

The big concern for Walgreens and CVS is that more intense competition from low-cost retailers, such as Walmart and Dollar General, could limit their growth opportunities and also squeeze their already-low margins. The big test will be whether Walgreens and CVS, being trusted neighborhood pharmacy retailers for decades, will have built up enough of a rapport with their customers to prevent them from going to Dollar General or Walmart stores instead for healthcare services. 

CVS Gross Profit Margin (Quarterly) Chart.

CVS Gross Profit Margin (Quarterly) data by YCharts.

Is this enough of a reason for investors to ditch Walgreens and CVS?

It's still the early innings of Dollar General's and Walmart's strategies for getting deeper into healthcare. And investors shouldn't assume that things will go smoothly for those businesses and that they will stay the course. Consumers can already buy healthcare products from Amazon, and the tech giant now has Amazon Pharmacy, and sales haven't exactly been nosediving for Walgreens and CVS as a result of those initiatives.

While the risk these pharmacy retailers are facing from new entrants shouldn't be ignored, it shouldn't be exaggerated, either. It has taken decades for them to build up their brands, and that should give them an advantage over Dollar General and Walmart, at least in the short term. Investors don't need to sell their investments in Walgreens or CVS over this news. But they should, however, pay attention to how effectively these businesses are rolling out their healthcare strategies and any efforts they are making to strengthen their margins, as that could play a key role in their ability to take on new threats and compete for market share.