Yes, that is the historical story, and most of us do know it, apart from a few conspiracy theorists who'll have their own versions to suit their particular agendas.
Yes, it was extreme force, so, was it justified? Yes, I believe it was - it probably saved as many lives as it killed - hand to...
On the other hand, as there is no way of recording it, we can never know how many people were deterred in the past by the existence of the death penalty. And there can never be any definitive evidence to prove that no person, ever, wasn't deterred.