It's not exactly "thinking about hurting my children" and more having depersonalised thoughts of someone who looks like me and has ny life, but isn't me, hurting my children.
I'm happy to hear you never personally experienced that symptom, that makes you lucky. It is a very common symptom of postpartum depression, and anxiety.
They are terrifying thoughts. No one who experiences true intrusive thoughts is even entertaining the idea of acting on them, removing someone from society is overkill in most cases. There is cause for concern when there are pre-existing mental health conditions that tap into impulsivity, hallucination, and derealisation, but that's why you need to act on a case by case basis.
I agree that people who are experiencing intrusive thoughts of harming others need professional pshycological support - but not because they are a danger to society, that's not the nature of the disease. Intrusive thoughts are a source of anxiety and trauma in and of themselves, and left untreated can trigger OCD symptoms in people who didn't previously have OCD.
Trust me these thoughts can come easily when you do work with meat. Just having to gut a rabbit once in my life, causes me to this day intrusive thoughts that I find incredibly uncomfortable whenever I'm handling any living being. My brain suddenly going "By the way, this is how it would feel to cut through that animals skin".
A person can experience many things that can cause these intrusive thoughts from past experiences. In my case it was cutting meat. Videogames also massively further provide fuel for uncomfortable pieces of imagination. Notable is that people do not have the urge to act upon it, rather so it's literally just the brain forcing you to imagine it as a possibility.
Your narrow anecdotal evidence does not match with everyone.