Mercy does not trump justice; they are both virtues and are not in contention with one another.
They are both virtues, but mercy exalteth itself above judgment (Jas. 2:13). This is not to say God’s justice isn’t necessary, or that it and His mercy are in contention with one another.
Consider the adulterous woman who was brought before Jesus. He said those who were without sin should throw the stones. And, no one struck her, because no one was without sin. So, He confirmed the Law that inflicts lapidation on adulterers, but He also saved the woman because not one lapidator could be found. He could have killed her, it would have been justice, but it would not have been mercy. He gave that soul time and possibility to arriving at repentance and holiness, if she wished to reach them.
What hurt Jesus was the lack of charity and sincerity in the accusers. Not because they lied in accusing, for the woman was really guilty, but they were insincere being scandalized at something they had committed numerous times, and that only greater cunning and better luck had allowed to remain concealed. The woman had not been so cunning and lucky, and none of her accusers were free from sin. They lacked charity and sincerity. It was Jesus who was charitable to the dejected woman. Jesus, the Only One, Who should’ve been disgusted with her. Remember: the kinder one is, the more compassionate one is to culprits. One is not lenient to the fault itself, no, but one is indulgent to weak people who have not resisted temptation.
Consider Cain and Abel. After Cain killed Abel, Cain knew there’d be those who would kill him in return,
with [human] justice according to “eye for an eye, tooth for a tooth”. God forbid man from killing Cain, and warned if anyone shall they’d be punished seven times. And, he who condemns
without [human] justice will be punished seventy-seven times. One must remember this as God said: “thou shalt not kill”.
One ought to be free from sin in order to condemn with justice. And, there is one lawgiver, and judge, that is able to destroy and to deliver:
God (Jas. 4:12). See also Mat. 7:1-6, Lk. 6:37, and so on. Man should follow Jesus’s example in word and deed of mercy, for judgement without mercy will be shown to those who have not shown mercy to others (Jas. 2:13).