that's a toughie. i'm not proud of it, but i've cheated in long-term relationships, twice, and the blokes never found out.
i made sure the person was always someone with just as much to lose as i had if found out. so they were very discreet. i also made 100% it wasn't someone silly enough to fall in love.
in addition i made sure it was someone entirely disconnected to the life i shared with my partner. someone totally out of our sphere.
i NEVER texted, either, only talked. i'd save their names under a friends name so if my partner chanced to look at my call log he'd see nothing but friends' names. NEVER emailed, either.
my lovers and i had code sentences in case one or another called at an inappropriate time.
i also had a large circle of female friends, all of whom were good alibis.
kept having the same type of sex.
so it could be less straightforward. sorry to be blunt, but sometimes people can be quite cunning.