Can someone become incapable of cheating after they have cheated? Absolutely.
But it takes a lot more than white-knuckling fidelity and repeatedly telling yourself, "I will never do that again."
They have to find the why beneath the why they think they already know.
Many affairs are driven by things like avoidance, escape, reactance, entitlement, poor boundaries, compartmentalization, conflict avoidance, difficulty tolerating uncomfortable emotions, or simply the thrill of doing something forbidden. Saying "I was unhappy," "I liked the attention," or "I made a terrible choice" may be true, but those answers usually do not go deep enough.
Why did those feelings become permission to betray?
Why was deception available as a coping mechanism?
Why did secrecy feel easier than honesty?
Why was protecting the affair, or protecting themselves from discomfort, more important than protecting the relationship?
That is the work.
They have to understand what made them susceptible to going down that road in the first place, then make substantive changes to those parts of themselves.
That usually means becoming radically honest, authentic, proactively transparent, intentional, and willing to protect the relationship even when doing so conflicts with what they happen to feel or want in a particular moment. It means learning to bring uncomfortable things into the light instead of hiding them, dealing with problems directly instead of escaping them, and refusing to let emotion become the decision-maker.
Just doubling down on "I won't cheat again" is, in my opinion, a poor indicator of whether someone will actually remain faithful. Plenty of people sincerely mean that when they say it.
The better question is whether they have dismantled the internal machinery that made betrayal possible.
If they truly understand why they cheated, address the deeper causes, and fundamentally change how they deal with themselves and their primary relationship, then yes, I think a person can reach a point where having another affair is no longer something they are realistically capable of doing.