The key words in the question are these: “but not to get hurt again.” When we seek justice we do not necessarily have as our goal “not getting hurt again.” If we fail to try to reconcile because of possible hurt, then we are misunderstanding what it means to reconcile. Most people will get hurt by bosses and spouses again because we are all imperfect.
I think the key to an answer here is this: Does the offending person show the “three r’s” of remorse, repentance, and recompense? In other words, is there inner sadness (remorse) for what he or she did? Is there language that suggests this sorrow (repentance)? And is there an attempt by the offending person to do something about a grave offense (recompense)? Yes, there may be negative consequences when quitting a job or leaving a marriage and so one must not do so too quickly and especially because of the issue of being hurt again. If the offender consistently offends and shows no hint of instituting the “three r’s,” then staying in the job may be more hurtful than leaving. In the case of marriage, if the other is a consistent offender over a period of years, say, and is showing no hint of “the three r’s,” then one has to question whether there is a valid marriage, which, depending on one’s particular religious beliefs, can be determined by religious authorities.