Another way to have dealt with the issue, not perfect but it could have worked, is have the reavel towards the end that either the particles won't/can't work when they're harvested, the effect only works on the planet/the influence of the planet and you reverse to your original state once you leave the influence, or that Ruafo was pulling a fast one and the collector is actually a WMD the whole time and he couldn't give a shit about anything other than nuking the planet.
Of course if they don't find out only the collector goes that could be a surprisingly dark ending to a Star Trek movie which would also show some surprising cojones on the film makers part.
Of course this would probably have then been something that would work on a tv series so they could do explore the ramifications of the Federation unintentionally helping to commit genocide.
Because let's face it wouldn't be something that could just be dumped on a rouge group the Federation would have to deal with having just fried an entire planet of innocent people especially if the rest of the quadrant found out about it.
Might have actually made for some interesting TV.