I share your skepticism, but unfortunately I don't think anyone else has that ability either. So any time anyone who raises an insanity defense is allowed to go free, society is taking a risk.
In the particular case discussed in this article, I'm not sure there was much of a risk, since the reason for the claimed insanity was a very particular situation and it was directed at particular individuals. There was no evidence that the defendant was likely to harm anyone else. But of course that's not true in many cases involving an insanity defense.
To me the idea of denying this in a judicial setting even as a possibility is absurd. Maybe I misread it, but I thought the piece was arguing against the broader rationales about grounds rather than anything about the disposition of the particular case per se.
I feel like this is fundamentally misguided on some level when, apparently, there's fundamentally no one charged with any meaningful duty towards protecting those who get victimized. But most people never have to think about this, so how many even think about kids who find brain matter from a badly beaten "hat" staining the basement walls?