Throw in any of the following products:
GLA's No Planaria
Benibachi's Planaria Zero (same thing as No Planaria, they are both betel nut extract)
Dog dewormer (fenbendazole)
Albendazole (it treats human intestinal parasites)
Any one of these will effectively limit population of planaria, if not drive them to extinction in your tank.
In the case of albendazole, it works by inhibiting the worms from absorbing nutrition, effectively starving them to death.
As for gravel vacuuming, perhaps you can put a fine mesh on the intake that will not suck in shrimps.
Everything, Nothing, Nothing, Everything