:bism: (In the Name of God, the Most Beneficent, the Most Merciful)
(Peace be upon you)
Please remember that everything must be taken and understood in context. The Quraish tortured Prophet Muhammad :saws:
(peace and blessings be upon him) and the Companions
(may God be pleased with them) for years and Prophet Muhammad :saws:
(peace and blessings be upon him) prayed for their guidance for years and years and years. The incident you mention was after years of heinous and evil activities and plotting against him that had been happening and realizing that they never intended to stop their evil, and so Prophet Muhammad :saws:
(peace and blessings be upon him) asked that God take revenge for the evil with which they're repaying all his mercy and goodness and patience.
For example, Prophet Noah
alayhis salaam (peace be upon him), for example, also called people to accept submission to God and abandon idolatry for some 900 years but then realizing that they'd not repent and did not intend to do anything but continue in their evil and abuse and reviling of him, he also prayed against for God to take revenge as befits the evil with which they'd been repaying his goodness and patience. That was when the ark was built to save the believers from the flood that was to cover and destroy the disbelievers.
Similarly, the miracle of the prophetic supplication to which you're referring was that the specific individuals responsible for throwing that dung, innards of animal, and blood on the shoulders of Prophet :saws:
(peace and blessings be upon him) while prostrating in prayer was that they indeed did die in the Battle of Badr; and even Prophet Muhammad's :saws:
(peace and blessings be upon him) supplication was also a mercy to these specific persons because they otherwise would have continued in their evil and been in the hereafter more punished thereafter.
So, in the context, we should understand that the first point, the middle point, and the second to last point is always about showing goodness and patience; however, the last point when people are entirely too set and intent upon doing evil to the point wherein there is absolutely no hope for them that can be perceived can a Muslim may pray to God in Islamic etiquette as the absolute last resort against someone who has crossed all bounds of decency and humanness and even that supplication should be seen as a mercy to to put paid to evil-doing and mischief.
Remember, God sent Prophet Muhammad :saws:
(peace and blessings be upon him) as a "mercy to the worlds" (Quran 21:107); therefore, as Muslims, we should always, always, always embody that mercy in our character and actions.
And also, remember Prophet Muhammad :saws:
(peace and blessings be upon him) said, "
The entire humanity is Allah’s family, and Allah loves him most from among this family, who benefits the family most."
Prophet Muhammad :saws:
(peace and blessings be upon him) said,
“The best from among you is the one from whom you expect the good and people are safe from his mischief. And the worst from among you is the one from whom you don’t expect any good and people are not safe from his mischief.”
Prophet Muhammad :saws:
(peace and blessings be upon him) also said, “
He who is not merciful to people Allah will not be merciful to him.”
:wa: (And peace be upon you)
I read where The Prophet :saw: Made dua against the Mushriks whom put poured (AFAIK) dung on the Prophet :saw: audhu billah.
They deserved the bad things said about them imo.