I dont believe they are planaria. These worms stay in the substrate only right? I got them in my shrimp tank. I also have planaria too and possibly another species of worms. Nothing you can do really to get rid of them for good. Your efforts are useless because they exist in the water just like ich, they come out when certain conditions are met. The best way is to keep their population down by taking away what they need to thrive. I use to pull out alot of them in my shrimp tank, but now when I do gravel vacs there is only a few.
They dont ever leave the substrate either, they stay there breaking up waste and food. Ive dump some of them in my sink to look at them and I noticed they freak out when they arent covered, they dont like being exposed, so they stay in the substrate.