TRIM has nothing to do with bad cells. TRIM has to do with preventing dirty blocks.
The sector remapping handle bad cells by mapping them to good ones. HDDs do the exact same thing... they have a reserve number of good sectors.
You can detect this sectors if there are no more good sectors to remap OR if you run a scan before the drive has a chance to remap.