A death sentence would certainly prevent this person from killing another child.
(Whether a death sentence is good for society in general is a different question)
Indeed, but it would also be not good to be wrongly sentenced to life in prison.
Once inside, chances to get out with a retrial are pretty slim.
Fatal misstakes are bad in any situation.