I agree with you that the party having the affair wishing to confess is doing it because of their guilt or whatever reason. That is selfish.
I also agree with you that Harry and Snape's relationship would have survived. However, I don't know if Severus really came to his senses. Yes he did with the shop-keeper, but what about someone else that may intrigue him enough later on. Severus did think toward the end of the story: along with such common pleasures and conveniences that had been absent from most of Severus' life. He'd accepted them with relative prudence and moderation, and he thought it must be wisdom, this new indifference to the incidentals he'd been offered and had enjoyed. It may not have been what the writer intended, but I read this as a pattern that Severus has done before and will do again until he's bored with the one he's with, or is almost caught because he always knows Harry is there to fall back to.
It doesn't seem like Harry has gained anything if Severus continues along the same line of thinking that it's OK to have dalliances as long as Snape thinks he uses "prudence and moderation" and he believes it's OK to have affairs as long as they are secret. That's not a relationship based on fidelity or trust, with one person giving themselves completely to the other, and the other being selfish by having their cake and eating it too. A line needs to be drawn somewhere.
Severus did stop his dalliance yet he still started it for whatever reason and it was a betrayal of commitment to Harry. I wonder how Severus would feel as he's so insecure, if Harry had the affair? Somehow I don't think he'd take it very lightly even if he found out years later. If they'd both agreed on an open relationship, I would have a completely different view on the whole matter if either of them had someone outside their partnership :)
So I guess I'm trying to say that "knowing" about an affair is explosively damaging. But keeping a secret about an affair is still damaging because the trust and fidelity "is" broken even if the affair is kept a secret. And who knows whether the secret comes out later? How much more betrayed would the betrayed partner feel that they'd been made a fool of for however long?
It's a very emotional topic with many differing opinions, that's for sure.