Smashing a hard drive with a hammer won't guarantee to render it completely impossible to get the data.
It will almost certainly render it very difficult, and might render it impossible, but what if you just smashed the outer casing, and the platters remained intact?
An SSD is even more likely to be able to retain the data, as it's solid state - no moving parts.
No, your best bet is to bring it to the boil in a pan of salt water and simmer for at least 24 hours.