IMO that would be the best possible outcome.
I disagree.
The best possible outcome would have been if his condition had been diagnosed a long time ago and he would have received help to live with this condition within society instead of isolating himself with alternate newsfeeds.
Now one man is locked up and will cost a lot of money to society, an act that will not bring his victims back nor change him into what he could have been before he did what he did.
It's estimated that about 1/4 live with some kind of known non-typical variation of the human psyche. Most go undiagnosed. Many never have more than mild discomfort but still have found ways to adapt and function within the society.
We stigmatize a lot against mental disorders. A person who did nothing but came out as scitzophrenic would suffer social stigmatization which wouldn't have been given to a person who came out with cancer. Most people get scared and do not know how to act and would probably mistrust even if the person claim to function just fine.
Part of the issue is the idea that the mind is just a ghost in the machine, not part of the human body. We like to imagine the brain and it's thoughts as chrystal clear, that perceive the world objectively and apply the normative standard of reasoning before making decisions. We are disencouraged to see the brain as an organ that runs constant risks of not working at it's peak. While we recognize that people have different length, shoesizes, haircolor and eyecolor we are generally poorly uneducated on understanding that a person can also
thinks differently than we do.
I believe that if there's a challenge for the next 100 years, it's to be more aware of psychological differences without attacking people. The "act unto others as you would like them to act unto you" must be replaced with "learn to act unto others as they would like them to act unto them".
Another thing we should be aware of are that radical and extreme information needs the educated to speak out against it. We cannot just let it go and say "only crazy people believes in that", because that in itself tells us how important it is to speak out.