I’m unsure if cheating can be prevented intentionally. But you can set upon a course to lessen the likelihood. And it helps if “cheating” is defined before it occurs.
Some think cheating is the physical act of having sex with another person outside the relationship.
Some think cheating occurs if a partner privately surfs porn for sexual stimulation.
Some think cheating can be an emotional affair with a co-worker or online association.
I once had a girlfriend who thought cheating was the simple act of looking at another woman and being unsure of my thoughts. If I saw a girl with interesting shoes, and looked at her for that reason, my girlfriend would assume that meant I wanted to leave her for someone better. That relationship didn’t last long.
______
To lesson the likelihood of cheating, I believe that open and honest communication is important. I think a couple should have many conversations about values, and how to achieve future goals together.
Patience and empathy rank pretty high too. If Hubby comes home stressed and tired, and doesn’t give Wiffy the proper compliments she needs to feel good about herself, then Wiffy should put it in perspective of what kind of issues Hubby is dealing with at work, and instead of taking things so personally, risking becoming an emotional co-dependent, perhaps try to become Hubby’s sanctuary away from work stress.
It’s also very important to allow each other to have their own personal space, away from the other. Hubby shouldn’t look at Wiffy’s new hobby as a competition against him. He should see her hobby as an expression of who she is becoming on her own merit, and encourage her to become all she can be, even without him. Wiffy will be attracted to those who encourage her, even amidst her failures.