I knew a guy when I served in the US military who got caught cheating in a semi-related way. He got assigned to a base in a new state and his wife refused to relocate their whole family for the few years he'd be assigned there, so he went by himself, leaving his wife and kids in his home state.
Turns out, he was sexting one of his younger subordinates at work. One of his daughters found out when she tried to use an old tablet and found out his account was still synced to it. She saw all his texts updating in real time.
He was ultra-conservative and didn't believe in divorce, so he was doing everything he could to save his marriage. His wife forced him to install security cameras in every room of his apartment and banned him from going anywhere after work. She knew his schedule and expected him home immediately after work ended. He was basically on house arrest until his job was done and he could move home.
The last I heard, he told his wife the landlord needed to paint the walls, so he removed all the cameras, dunked them in the bathtub, then played dumb when none of them would work when he set them back up again. He was seen inviting young women over to his apartment after that. So, you know... he didn't learn his lesson.