I think the far simpler root cause of all this is amphetamine abuse. A prolonged state of sleep shortening (he openly talks of using amphetamines and sleeping pills in a tweet from a year ago) and mania causes psychosis.
It's likely that Sam genuinely believed his own deceptions that he created earlier to grift and the amphetamine have eroded his capacity to manage risks such as committing multiple felonies that no other CEO would dare because of its obvious consequences such as spending the rest of your life behind a prison.
I've heard a few legal experts and their take was : Sam & Caroline are going to spend the rest of their lives locked up. The reality still hasn't sunk in yet seeing Sam's wild apology that destroyed his last possible defense of alleging incompetence (he's depiction of himself as a bad coder that caused the situation) with a weird insistence that what he tweeted is not admission.
1. Access controls - If the CEO can secretly manipulate records, it's obviously game over.
2. Compliance is sort of an all-or-nothing game. You either do it all, or a sufficiently motivated party will slip through the cracks that you leave.