i feed my bichirs worms from soil.. even the worms that i get if there's flood in our place.. bichirs love it but hard for them to swallow if they are still small.. no problems encountered..
My poly absolutely loves worms, he just inhales them. No problems yet, but like gianolrac said, if it's a small poly you may want to cut the worm up so they can eat it easier.
If you are worried about parasites what i've heard of doing is not boiling it but rinsing it in hot water and if you are still thinking something is lurking freeze it. i personally haven't tried worms yet but i look forward to lol.