The Mishna Sanhedrin 81B brings a form of execution where the convicted person is placed in a tight chamber, fed minimal amounts of food to shrink the stomach, and then fed a lot to cause the stomach to burst, causing death (see jlaw article for details about this form of execution).
How was this torture allowed?
How is this a humane way to execute someone (i.e. it is tzar baalei chayim, the Torah does not explicitly allow putting a person through more pain than the halacha mandates, and what right do we have being God's tool of retribution if not to give a swift execution when necessary)? Although the person deserved lashes for the kareit sin he/she did, this form of execution seems to be excessively harsh. Did death happen instantaneously so that the individual did not have to suffer that much when it happened or were they drugged (although the minimal feeding was presumably still painful)?
Why didn't loving your fellow apply in this case? If you want to say that breaking that was better than directly killing someone who is not technically guilty of death in Torah law, that's not correct, because beth din has a right to put someone to death if they deem it fitting (see Sanhedrin 46a, and Shulchan Aruch Choshen Mishpat 2; there are also numerous cases even during the Middle Ages of alternative forms of execution); so why not choose swift death over torture? Also, if they wanted to kill indirectly (grama), why didn't they find some other way to do it?