Also, at least in the case of the NES carts, they had a terrible problem of getting dust in them and not being readable in the system. Of course, the same could be said of Discs that if you scratch them they won't work, but at least you can keep your discs in working order for your whole lifetime if you take good enough care of them. The same thing can't be said for carts, because the contacts will corrode, and also the carts usually rely on batteries to keep saves. Eventually those batteries are going to die.
You say carts have no moving parts, but the act of jamming them into a console and ripping them out is movement, and it results in wear and tear on those contacts. A laser reading a plastic disc isn't going to wear it out at least.
Isn't that NES thing a myth? The real reason NES carts aren't readable is because of the console itself. That springy tray the NES has bends the contacts in the cartridge over time (or something like that). Bend them back and it works. Notice that SNES or Genesis games don't seem to attract so much "dust" as NES games do even though all of them have the same exposed contacts. Hell a friend of mine found a SNES cartridge complete caked in dust that was just the circuit board without the plastic casing. He put in his SNES and it STILL worked. Turns out it was Super Punch-Out!
Optical disc readers don't die out because of the laser but the little motor that turns the disc. That thing is working hard every time you play a game and like all motors eventually it will wear itself out. And battery saves is an out-of-date method that is no longer used. GBA cartridges did not use batteries to save and neither do DS games.
I imagine any time we go back to cartridges permanently would be at some point where optical discs no longer have a significant cost advantage over cartridges. Cartridges are superior in every way except cost. Until then though no one is going to switch.