With all the advanced technology in our cameras, focus should never be an issue, right?
You know better than that. Cameras are capable of doing a lot of things, but it's still up to the person behind the viewfinder to call the shots. Pun intended.
Your camera does not understand what kind of photograph you're trying to make. Your camera doesn't know how to account for the conditions. Your camera doesn't know what you're trying to emphasize visually. The decisions are up to you.
Particularly with nature photography, autofocus is not applicable in every circumstance. If it's foggy, or if it's snowing, or if you're shooting in low light, autofocus won't work. These situations will confuse the camera; it won't be able to find a subject and lock in. (Likewise, you may need to switch to manual focus if you're trying to capture movement, like water or clouds.)
There are times when it's appropriate to select "M" and rely on your own eyes.
But what about focus stacking for landscapes? When is that the correct choice?
Some will suggest you use it as often as possible. Here's why. The apertures that create the sharpest images are in the f/8 - f/11 range. Chances are, though, you're probably shooting with your lens stopped down more than that. Particularly when creating a grand landscape, you need as much depth of field as possible. f/16 - maybe f/18 - is often optimal.
Stopping down, though, subtly impacts image quality because of diffraction (a function of the way the light passes through the smaller aperture opening). The amount of degradation depends on the lens and body you're using. This loss of sharpness is typically not noticeable until you zoom way in or print the image in a very large size. Depending on how you're going to use the photograph, then, this phenomenon is potentially a problem.
Focus stacking can be the solution, and this is why some folks will tell you to use it all the time.
I won't.
Cost benefit is one reason: there's often not enough enhanced quality to justify the additional work required both during capture and when processing. Foremost, though, is conditions. They're often not conducive to focus stacking. Exhibit A would have to be wind. It's nearly impossible to stack unless it's reasonably calm, and it's almost never calm where I live in Teton Country.
I'm not suggesting you shouldn't liberally employ focus stacking. If it works for you, by all means go for it - but don't feel you must.
There are ways to minimize diffraction. Try to avoid apertures smaller than f/18. Invest in good lenses, and test them to determine their "sweet spot." Invest in good filters, too. The combination of cheap filters and expensive glass is a zero sum game.
That said, there are situations when you need focus stacking to make a successful image, such as any time your lens is physically near the foreground subject i.e. you're trying to create a landscape with an exaggerated depth of field.
Here in the Tetons, it's often too windy for that, in which case I'm forced to get further away from the foreground element and/or compose differently.
The number of photographs you need to capture depends on what you're shooting. Detailed, complex macro subjects require quite a few, while you can generally stick with a handful for most landscapes. Remember to use a wider aperture for optimal quality.
Bear in mind that focus stacking can be utilized in a nuanced way. Maybe you don't want the image to be tack sharp all the way from front to back.

This little bloom was in a field and surrounded by other wildflowers. While I selected my subjects that morning with care (considering placement relative to what was behind them), I knew I wanted to completely blur the background in each of my photographs. Therefore, I didn't stack all the way from front to back - and also decided against keeping each one of the pom-poms on the subject flower in sharp focus. Had I done so, too much of the "neighboring" flowers would also have been sharp, creating distractions.
Opening up to f/5.6, I stacked enough to capture detail on the blooms closest to the lens and let the rest go soft.

This image, on the other hand, required stacking all the way from front to back. I was only a few feet from the rocks, shooting at a focal length of 34mm. The aperture was set at f/8 and I combined a series of four or maybe five captures. Because there was rippling water involved, I wanted to keep it to the bare minimum.
Focus stacking is a great tool to have in your kit, but it's not a prerequisite for landscape photography. As indicated, it's often impractical - even when you want to use it Mother Nature might not let you.
If you do decide to stack, remember to select a wider aperture. It's not a bad idea to take more images than you think you'll need - and also to capture more than one series of images.
While you can combine images that were captured handheld, you will have infinitely more success when using a tripod.
Regarding processing, you don't need to purchase additional software to focus stack. Photoshop enables it, although it's not as robust as specialized tools like Helicon Focus or Zerene Stacker. I haven't used the latter but Helicon definitely processes faster, offers more options to render, and tends to leave fewer artifacts than Photoshop.
That said, I've been leaning toward Photoshop lately because I typically don't employ stacking often enough to remember to keep my Helicon license current.