Formatting a "corrupt SD card" fails - is the card dead?
Most likely. If you had the card set to be read as internal storage, Android sets an encryption on it. After a factory reset, the keys change, and the card is permanently write-protected. I have had no luck reversing this on mine.

Regards.