Planaria is more like leeches... more slug and less wormy.
It is highly unlikely that this tank was adequately cycled and stocked in the 3 week period that could sustain life without casualty unless you used products like microb-lift niteout 2 and special blend or equivalent.
If this were the case, there would likely be mention of water params, water change schedules, tds and focused on toxicity rather than chalking it up to wormy parasites. Has the water been changed or even tested for ammonia, nitrates and nitrides?
Is your water gh/kh/ph sufficient to sustain invertebrates... death within 2-3 weeks is actually common for shrimp living in ill suited water conditions as they can pretty much hold until such time...
"I am Groot", the faithful protector