How should I format/repair a write-protected laptop SSD with I/O errors?
You don’t. Once the drive is dead, it’s dead.
The drive is bad. Write protected mode is a safety feature to hopefully allow you to recover the data that is still there.
It’s time to recover what data you can and replace it.