Would it be moral for the state to punish heresy with the death penalty?
I'm only asking about the moral aspect. So I'm not interested in the likelihood or posibility of any state doing this, but simply if, let's say, Monaco made heresy illegal, would Catholics be able to deny it as immoral? St Thomas Aquinas says that murder of the soul (heresy) is worse thsn murder of the body, and many heretics were killed in the Spanish Inquisition. I know the numbers are greatly exaggerated, but let's be honest, heretics were killed for being heretics, and repentabt heretics were mercifully strangled. ISIS executes those who don't convert to Islam, but that's immoral because islam is wrong. It's a different story when talking about Catholicism because Catholicism is the correct religion. And if you accept that the state exists to help us be more virtuous, then stopping heresy fron spreading using lethal force would be justified.
It probably wouldn't be prudent to kill heretics because ideas can spread over the internet and so on, but again, my question is about the morality of this. So was it moral to kill those heretics back during the Spanish Inquisition?