Answer:
It depends on the context. It all depends on the phrase about picking your battles. If this is something that should be fought for, like the freedom of a country, there is a difference between giving up and pulling back for the sake of preserving lives. Risking your life and doing something you know will cost you your life are two very different things.
Overall, I would answer that abandoning a plan should come when the risk is far greater than the reward. And even when the risk and reward are equal, or the reward is greater, be mindful of how you go about it.