Imo, even cartridge costs and limitations can't completely justify the huge drop in 3rd party support.
You are underestimating how much better was the Sony deal compared to Nintendo (and even Sega).
In early 1997 what an american publisher was asked to pay to the console manufacturer for a CD game on PS1/Saturn was around $7.
Nintendo was asking between $30 and $38 for a cart depending on the size and memory configuration (64Mbit-96Mbit, eprom or not) + some extra cents for other items (instruction manual, label, box etc.).
But it wasn't just the upfront price the problem, the risk connect to cart business was also higher compared to CD due to the much longer time to reorder (months vs two weeks offered by Sony which owned the CD pressing plants).
On top of that Sony instituted a royalty rebate program that consisted in them giving back a certain percentage of the royalties paid depending if a game surpassed certain sales thresholds (500K, 1M, 2M).
I will always repeat that the true revolution introduced in the 32/64 bit generation wasn't the CD, because the CD was just a 'mean to an end', no the true revolution was Sony being the first console manufacturer that succeeded utilizing a third-party driven model which put all the other pure game companies which produced consoles in a hard spot, in fact every first-party driven console maker was soon after driven out of the market with the big exception of Nintendo (which is just that a special exception).