DriveDx was recommended by Macworld in the article “What you can do with an internal SSD module from a vintage Mac”:

You should also run the SSD through DriveDx, which will give you a sense of the remaining lifespan: SSDs eventually wear out, and it doesn’t make sense to buy an enclosure if the drive doesn’t have much time left on it.