Why should we have any expectation that such prevention is possible, let alone desirable? That seems as naive to me as any expectation that breaking an unjust law should be without consequence.
It's desirable to prevent because if everyone is allowed to break the law if it violates their subjective views of morality, then the law loses all of its effective power. This means the law can no longer be enforced, as anyone would be able to claim a moral objection at any time. A system with laws that can't be enforced is not different in any practical way from a system with no laws at all-- aka Anarchy.
On the subject of whether or not it's possible, I'd say no. So I still think that the best way to ensure that society continues to function is to stop telling people that they can break laws that they personally deem unjust or immoral.
I thought I made clear that I did not hold that breaking unjust laws either would be or should be without consequence or enforcement. Indeed, in classical examples of civil disobedience, such as those of Ghandi and King, those who broke unjust laws expected they would receive the consequences of doing so. They did so in expectation that receiving such consequences would help convince society at large that the laws they broke were unjust.