I've got two Macbook Pros - a 2014 15" (500 GB SSD) and a 2015 13" (1 TB SSD). Both are still going. I can't imagine newer Macs are worse. I'd be more concerned about replacing the battery!
The newer ones could be worse as they move to smaller process nodes and store more bits per cell. That said, the controller logic is improving, and larger capacities mean more room for wear leveling, so it shouldn't be too bad.
My MacBook Pro (2015, 15 inch) started having some SSD issues earlier this year after a bit more than seven years of heavy use, but it does seem to be partially mechanical because it would mostly happen after it had been in my bag.
Since I bought an M2 Pro to replace it, it hasn’t had the issue I think because I’m just leaving it at home and not flexing or squeezing it much. Perhaps the issue could be fixed permanently and properly with a bit of hot air to re-flow the solder balls.