The biggest problem with niche markets is math — pricing that is too low.
Niches can start small and grow larger, and usually do with great teams.
But ultimately, smaller and vertical markets have trouble hitting tens and hundreds of millions in revenue unless the deal size is larger than average.
A broad, horizontal app can solve just a piece of a larger problem. As long as “everyone” buys it, you can still build something big. It can still be cheap.
But a narrow, vertical app has to really solve the core, or at least one of the top core, problems of that niche. If it does, you should be able to charge tens of thousands, hundreds of thousands, or millions for your app.
So maybe don’t do the DropBox of a small vertical. But probably great to do the SAP or Veeva or probably Salesforce of it.