Feed less
My wrasses stopped hunting for food when I made sure everyone in the tank was nice and plump. After cutting back on feedings, my 2 wrasses swim side by side most of the day looking for micro fauna.
Not a guaranteed solution...but the flatworms are feeding on something. Either way, cutting back on feedings could help reduce their numbers.