The legal marijuana industry is still very new, and what it will look like a decade from now -- not to mention which companies will still be around -- is really anyone's guess. A few years ago, Aurora Cannabis was one of the top producers in the industry, but now its business looks to be in disarray amid high costs and a lack of profitability. Even Canopy Growth, which was once the top cannabis company in the world, has fallen a few steps behind Tilray and large multi-state operators like Curaleaf and Trulieve Cannabis

However, amidst all that noise there are two stocks that I would feel comfortable holding for the next 10 years: Scotts Miracle-Gro (SMG -0.16%) and Innovative Industrial Properties (IIPR -0.92%). Both are pick-and-shovel plays that are likely to remain solid investments no matter how many other cannabis producers join the industry.

Two people work inside a greenhouse.

Image source: Getty Images.

1. Scotts Miracle-Gro

Through its Hawthorne Gardening subdisidary, Scotts provides marijuana producers with the tools they need to grow cannabis via hydroponics, using a system of pipes and pumps instead of soil. Scotts traditionally was known simply for its conventional gardening business -- which falls under its U.S. consumer segment -- and while it still does that, it is growth in hydroponics that's sending sales through the roof.

On May 5, Scotts released its second-quarter results for the period ended April 3. Net sales of $1.8 billion rose by 32% from the prior-year period. The U.S. consumer segment grew 23% to $1.4 billion, while Hawthorne increased its sales at more than double that rate -- 66%, recording revenue of $363.8 million. Scotts noted that it was the fifth straight period in which Hawthorne's sales growth was in excess of 60%.

Although a growth rate that high isn't likely to persist over many years, more states legalizing marijuana and more companies and individuals growing pot will only create more demand for Hawthorne's products. It won't be surprising if that segment of its business remains strong for the foreseeable future.

At worst, Scotts is a stable dividend stock with a decent dividend yield of 1.2% (the S&P 500 average is about 1.4%). With profits in each of the past five fiscal years, its bottom line is stronger than most plant-touching businesses in the industry, and there's no reason to expect that will change in the near future.

2. Innovative Industrial Properties

While Scotts provides marijuana companies with the tools to grow cannabis, Innovative Industrial provides them with space for their cultivation activities. In many cases, it actually is a source of cash infusion for businesses that are struggling and need to raise money. Through sale-leaseback agreements, the grower sells their property to Innovative Industrial and in return gets money to help grow its business. Meanwhile, the real estate investment trust (REIT) gets another tenant it can collect recurring payments from.

By adding to its list of properties, Innovative Industrial accelerates its sales growth. REITs aren't typically known for high growth, given that rent payments remain fairly consistent month over month. But through acquiring new properties, the company gets bigger and its recurring income gets larger. When Innovative Industrial reported its first-quarter results on May 5 for the first three months of the year, it noted it had already made four acquisitions in 2021 across California, Florida, Michigan, and Texas.

In the first quarter, its rental revenue totaled $42.9 billion -- more than double the $21.1 billion it reported in the same period last year. And with modest operating costs, the company was able to bank more than half of that (60%) as profit. REITs have strong high-margin business models that make them fairly safe buys to hang on to. And since they need to pay out at least 90% of their earnings, they are also promising income stocks to buy and hold for the long term. Today, Innovative Industrial's yield is at 3%.

Like Scotts, this is another solid cannabis investment that will likely only benefit from a larger industry and more companies getting involved, and that's why it's one of the better marijuana stocks to buy if you are looking at the long term.