Yes, elephants were specifically trained to execute prisoners in a variety of gruesome ways. Trainers could command elephants to end lives quickly or prolong suffering, depending on the desired outcome. This training showcased not only the intelligence and strength of elephants but also the dark aspects of human ingenuity.