There were many atrocious leaders world wide prior to Stalin and Hitler, in fact the Romans at the time of Christ were notably terrible in their executions of people, yet St. Paul, still defended the use of execution by the state in Romans 13.
Romans 13 didn’t specifically defend the use of execution. It is about submission to civil authority generally and I see it as similar to Jesus saying, “Give to Caesar what is Caesar’s” and generally not starting a revolution. Some scholars see it as specifically directed at Gentiles having to live under the authority of synagogue leaders. In any event, St. Paul himself had been involved in carrying out unjust executions of Christians, and he felt remorse for it, he didn’t think it was a great thing he had done.
From a practical standpoint, in the times of Rome, executing people, en masse and often unjustly, was considered the main way to keep order as well as provide public entertainment. Obviously any good Christian would morally disapprove of the cruelty and injustice involved, especially when Christians themselves were the ones getting executed. I don’t think any of the early martyrs thought such executions were okay, even though they might have taken some comfort in being able to give their lives for their faith, join their suffering with that of Jesus, and in so doing pass to a better life.
Regardless of whether the Church showed any official discomfort with executions in Roman times or during the next 19 centuries when various civil auhorities were burning people at the stake, drawing and quartering Catholic priests and martyrs, or guillotining people in large numbers in France, Hitler and Stalin refined the art of execution to the point where each of them executed millions of people. There is no way the Church could approve of that - and once you get to the point where you are objecting to the mass murder of millions, it raises the issue that one life is just as important to God, just as loved by God, as millions of lives.
Plus it makes it pretty hard for the Church to come out strongly against abortion and euthanasia and preach respect for life and oppose the government policies that end life, while still saying “but it’s okay for the government to execute criminals”.
I’m not a philosopher or a theologian, but from a standpoint of pure common sense, you expect to see the Church standing up for human life in a big way, and that includes the human lives of people who the rest of society has thrown away - the unborn, the infirm, the elderly, and the criminal on death row. The Church position makes total sense to me as you cannot tell someone in USA that you’re “pro-life” and then in the next breath be calling for more executions. I’m frankly surprised that everybody is struggling so much with this issue, but then again I have been anti-death penalty for several decades for reasons not based in Church teaching (simply the practical reality that it is impossible to implement a death penalty in a completely unbiased, completely fair, and completely error-free way).