Just curious, but how do you know that was the reason? SSD's can fail prematurely, well before their write limit is reached, for any number of reasons.
Futher, it seems unlikely you would reach that limit even with heavy swap. Folks on this site have done calculations. and concluded reaching that limit would take many years.
The only way to know it was specifically because of writes would be if you'd run a SMART anaysis (easy enough to do from the terminal, or using an app like DriveDx), and found the number of writes was approaching the max. Did you or someone at the Apple store do that and, if so, what was the number?
Or, better still, you could run a SMART analysis on your wife's repaired computer (just wait until she's used it for, say, a month—long enough to get a good average usage figure—and download a trial version of DriveDx). Based on the number of days your wife has been using it, and the total number of writes, we can determine the average writes/day based on her actual use, and calculate how long it would take for her to reach the drive's write limit.
Here is what the report looks like when run from the Terminal:
View attachment 2317222