No; this is simple, if difficult. If you want to be ethical, you cannot sign an agreement knowing what it says in full, and then violate that agreement when the counterparty has operated in good faith.
What the person in your Jimmy Johns example has is the ability to seek work elsewhere.
They are indeed acting unethically if they choose to work at Jimmy Johns, knowing what Jimmy Johns requires of its employees, then proceed to quit and then go work at Subway.
I'm concerned you're considering "acting unethically" as a kind of condemnation. It's not. Life happens, and nobody's being sent to the stockade for acting unethically, but that is what you're doing when you violate a contract.
I'm not worried about "acting unethically" being a condemnation, but IMO actions taken in a vacuum can't really be judged to be ethical or unethical, which is what it seems like you're trying to do when you state that violating any arbitrary agreement is unethical. In fact I'm not sure you really fully believe this, since you add the proviso "when the counterparty has operated in good faith".
I would add that ethics is an entire branch of philosophy, so you know, there's so ambiguity between different folks' definitions. IMO it is ethical to violate contracts that would cause undue harm to one of the parties without good cause and furthermore it is unethical for a party to ask another to sign such a contract. And working at another sandwich place is not good cause. Clearly in your opinion you think it is unethical to violate such a contract because you appear to believe that violating any agreement (almost irrespective of context) is unethical. I'd be curious if you think that Jimmy Johns is ethical, unethical, or neutral for inserting such language into a contract in the first place. I would strongly disagree with that being either neutral or ethical.
What the person in your Jimmy Johns example has is the ability to seek work elsewhere.
They are indeed acting unethically if they choose to work at Jimmy Johns, knowing what Jimmy Johns requires of its employees, then proceed to quit and then go work at Subway.
I'm concerned you're considering "acting unethically" as a kind of condemnation. It's not. Life happens, and nobody's being sent to the stockade for acting unethically, but that is what you're doing when you violate a contract.