I don't really have the experience to comment, but if that would destroy your marriage, are you sure your marriage isn't destroyed already...?
Even moreso, it's a very strong indication of your commitment to the other person when, after admitting your lack of self-control, you consciously choose not to put yourself in those situations because you know how much it would hurt your S.O.
tl;dr; - A relationship where both parties are honest with each other and ok with the situation after being fully informed is the strongest possible relationship.
What do you call this, if not flirting with the idea?
This is just like using StayFocusd or maxvisit; you know you don't have the willpower, so you use other means to keep yourself productive (or faithful, in this case.)