This strategy should be a lot more reliable than others I've tested. This has a small chance to fail if your Hermit Crab takes some critical hits and dies before Smokey does.
If that does happen, you can restart the fight with another Hermit Crab, if you've got more than one Rare Hermit Crab. (You should, they're excellent.) Alternatively, you can be sneaky and log out, log onto another character that has some bandages on them and heal your pets before switching back.
I'm still new to writing my own TD Scripts, so please let me know you encounter a problem with it.