Targum Pseudo-Jonathan on Exodus 12:29 opens up a corner of the Exodus story that few readers notice. The verse says the firstborn of Egypt died, from Pharaoh's heir down to the firstborn of the captives in the dungeon. The Targum adds a reason for that striking detail: the captive kings in Pharaoh's prisons were firstborn of their own royal lines, held as hostages under Pharaoh's hand — and they were punished "for having rejoiced at the servitude of Israel."
Those foreign firstborn had no direct role in enslaving Israel. They were already captives themselves, chained in Pharaoh's dungeon. But in their captivity they had cheered when they heard of Israel's suffering. Perhaps they thought that a nation enslaved beside them was a comfort in their own chains. The Targum does not let that pass. Even from inside a prison, the delight at another people's slavery is a moral act that registers with divine justice.
The firstborn of the cattle die too, but the Targum adds a qualifier: the cattle "that did the work of the Mizraee." The animals who had been yoked to Pharaoh's labor apparatus die with him. The beasts of unrelated households are untouched. This is the kind of surgical precision the rabbis saw everywhere in the tenth plague.
The message is uncomfortable but consistent. To stand by silently while Israel is enslaved is dangerous. To celebrate that enslavement, even from behind bars, is accountable in the heavenly court.
Takeaway: Divine justice reads the thoughts of the captive as seriously as the commands of the king. Rejoicing at someone else's chains is not a neutral act.