What Constitutes a Failure?
Most people say MiniDisc failed here (in North America/USA). I'd argue it's more complicated than that, and there are different ways to measure success.
To be straight up: Failed products get discontinued, and, not just after 20 years, as happened with minidisc, but pretty early on.
Although Minidisc was niche, Sony itself probably considers it to have been a success, and probably profited off of it sustainably.
The raw numbers aren't great, one of the best numbers we have is that in 2003 Sony sold 300,000ish minidisc machines in the US. That's not a whole lot. A product that sells just 300,000 units in a year, here in the US where we had a population just shy of 280 million that year, is for sure niche.
But something can be niche, and still be profitable, and that's almost certainly the case with minidisc, as Sony decided to continue introducing and selling hardware here all the way up to 2011 when they discontinued the RH1/M200. (Sony was selling bookshelf stereos in Japan through to 2013, but I don't know if any of that hardware sold here.)
To add: During "Peak Minidisc" in Japan, Sony was selling a machine to something like 1/5 of people living in Japan every single year. It was not just "successful" but a pretty significant cultural touchstone in Japan for a meaningful while.
Some third-party manufacturers, such as Sharp, Onkyo, and TEAC-TASCAM continued manufacturing minidisc hardware for sale in Japan for a few more years after Sony stopped.
Sony itself continues actively manufacturing the MDW80T and MMD140B to this day. (Last confirmed in ~mid 2023.)