The Saturn managed to outsell the N64 in Japan, didn't it? Maybe in Europe too, though I'm less sure about that. In Japan the Saturn was even able to compete with the PS1 for the first few years, before FF7 came out. The N64 was only saved from being a Saturn level flop by its strong performance in North America compared to the rest of the world; it's quite remarkable how much Nintendo fell off from the heights of the SNES era during that time.
In other words, Sega wasn't the only one who struggled against the Sony juggernaut back then.
It's night and day, really.
Nintendo struggled against Sony back then too but on a totally different level from Sega.
Nintendo's TV console sales, with N64, shrunked sharply in Japan but remained close to the level of the SNES abroad, not just that but Nintendo was selling tons of first-party games (in fact Nintendo sold more first-party games on N64 than on SNES despite a contraction on third-party sales which have lower profit margins).
Saturn sold much better than Mega Drive in Japan and the third-party support from the japanese side improved considerably however overall sales paled compared to typical market leading consoles in that Country (basically it was a realtively strong also run in Japan) meanwhile sales abroad totally collapsed.
Even worse for Sega they were ill-prepared to confront strong opposition with the Saturn both for how the Saturn was conceived and due to how Sega consumer division's financial position began to precipitously falter in the latter years of the MD/Genesis.
Sony in the meantime had planned to go all out with a price war to drive off market the smaller game companies like Nintendo and Sega.
On the other hand Nintendo kept out-profiting the PlayStation division year after year.
Mega Drive/Genesis total sell-in worldwide: 30.75M
Mega Drive/Genesis total sell-in Japan: 3.58M
Mega Drive/Genesis total sell-in Abroad: 27.17M
(the above are the units manufactured by Sega, the number of units shipped by Sega)
SNES total sell-in worldwide: 49.10M
SNES total sell-in Japan: 17.17M
SNES total sell-in Abroad: 31.93M
(the above are the units manufactured by Nintendo, the number of units shipped by Nintendo)
Saturn total sell-in worldwide: 9.26M
Saturn total sell-in Japan: 5.90M
Saturn total sell-in Abroad: 3.36M
(the above are the units manufactured by Sega, the number of units shipped by Sega)
N64 total sell-in worldwide: 32.93M
N64 total sell-in Japan: 5.54M
N64 total sell-in Abroad: 27.39M
(the above are the units manufactured by Nintendo, the number of units shipped by Nintendo)
Sega, on the whole (that is including the successful arcade businesses), was never remotely close as profitable as Nintendo and began losing money around 1998.
In March 1998 Sega had to write down a huge special loss from its subsidiary Sega of America caused by the weak performance of the Saturn in North America and by unsold 16 bit inventory (!).
Mega Drive/Genesis was at the same time a blessing and a curse for Sega because it represented at first an extraordinary flywheel for the company which allowed Sega's management to make risky bets for growing the company further (most of which didn't pan out) however as fast was the rise as fast was the fall, leaving the company terribly exposed to adverse conditions (which came under the cloak of Sony).
Sega consumer divions (console) reached its profit peak in the fiscal year ending March 1993, the following year profits crashed 75% down and by the fiscal year ending March 1995 (before the Saturn launch in international markets) the division was losing money.
After that the healthy arcade divisons were effectively working to offset the losses incurred by the consumer division that was battling a desperate war against the stronger Sony and Nintendo.
The ending is known and include the launch of another console and many more losses.