Is God unjust if He inflicts wrath? No!
“And, if our unrighteousness God’s righteousness doth establish, what shall we say? is God unrighteous who is inflicting the wrath? (after the manner of a man I speak)” (Romans 3:5)
“let it not be! since how shall God judge the world?” (Romans 3:6)
Because how else will God judge the world for the evil which they have done? Shall their evil just be overlooked? If you say yes, then why are you complaining against the evil faced in your life (which makes your life unfair especially via the conduct of wicked men to you).
Thus, it’s “fair” that God inflicts wrath to Judge the world rendering back to them what “evil they have done toward others” (Perfect Justice).
“Woe to the wicked–it will go badly for them, for what they have done will be done to them.” (Isaiah 3:11)
God is Perfect in His Principle in that only “what they have done” which “will be done back to them”. Where? Most likely in “Hell”.
Remember, God doesn’t punish any “good people” if you are “really good”. He doesn’t make mistakes for on that Day, all deeds of all men will be revealed in “truth” by “Fire”.
“Every man’s work will be made manifest: for the day will declare it, because it will be revealed by fire; and the fire will try every man’s work, of what sort it is.” (1 Corinthians 3:13)
Many claim that “not believing in Him as God” is “not sin” which is “false”.
One reason: If you called the Living God by “another name” or by “another concept” or with “funny/disgusting depictions of Him both of how He looks or of His Actions” claiming that “He taught it”, doesn’t He reserve the right to “punish” you for “teaching all those lies and ugliness using His Holy Name” and even more so, “deceiving others into it as well” (marring His Holy Name in vain)?
In the end, God decides on whom He has Mercy (excuses their errors):
“For He says to Moses, “I will have mercy on whom I have mercy, and I will have compassion on whom I have compassion.”.” (Romans 9:15)