IIRC there was an issue early on with the M1 Macs that involved way higher than normal swap usage, and was potentially bad for SSDs. But I thought that was fixed within months.
Yeah, that sounds like a plausible culprit. And I wouldn't consider it outside the realm of possibility for Apple to replace the SSD for free - even if the laptop is now out of warranty.