I have dealt with both flat worms and dinoflangelates (dino)
For the flat worms suck out as many as you can and have a big waterchange ready and carbon. I dosed quite a bit over the reccomended amount of FWE that slaughtered them.
For the dino.
put the tank into a 72 hour black out cover the tank with a cover only leaving a small amount open at the top for gas exchange. After the 72 hours uncover and start using a product called Dino x use to be called Algae X made by fauna Marin follow the instructions to the letter and you will see your dino's go.
Both I've beaten doing the above and mates of mine have been in the same situation as yourself and done it as I done it and there tanks are now fine.
I also now have a yellow wrasse , cleaner wrasse and mystery wrasse in my tank and I've never seen another platworm since I treated.
Hope you get it sorted but restarting a tank should be the last resort