It doesn't take a lot of imagination to be able to offer a defense against an accusation of selective prosecution.
When questioned about use of discretion, answers that are grounded in the purpose for which the discretion was granted are better.
Could charge again: there was no jeopardy. Did charge again: acquittal.
One useful ability is to sustain doubt as long as possible: it allows you to examine the evidence from more angles. If you align youself with a view that the defendant is guilty (or innocent), that may blind you to other valid things.
Discretion, recall, is not just the act of deciding: it is the act of reasoning. (remember from sentencing).
So here, too, there's not much legally imposed constraint on the prosecutor.
The DA explains why he doesn't bring charges in a fairly notorious case.
But note that, with the exception of retribution, these are not purposes. They are strategies to achieve a different end. Is it just to impose burdens on somebody just to make them a better person? What possible claim of justice could there be in that case: my desire to improve you doesn't touch upon a justice interest.