There's a lot of practical research on fairness. There's a good summary review in a recent Economics Cooperation & Inequality episode of the Mindscape podcast.
The research behind Moral Foundations Theory, suggests there is a cross-cultural evolutionary-based drive for fairness, which we can relate to core moral foundations or intuitions which enable us to live cooperatively. That cooperative living has let us create culture, which has many powers, one and f which unfortunately is overiding demans for fairness.
Anthropologist David Graeber makes the case there is a fundamental difference between situations where populations are below ecologucal carrying capacity, vs at or above it, in this lecture: Indigenous Societies' Perspectives on the Modern State.
I'd interpret the emergence of morality as related to game theory, and the development of cultural mechanisms to maintain unstable equilibriums vs a race-to-the-bottom and a stable lose-lose equilibrium, like say a tragedy-of-the-commons. Discussed here: Is the tyrannicide perpetrated by William Tell morally legitimate?
Our moral reasoning though, our defining of Ought rather than just mutual contention, I argue has to be related to intersubjectivity, in this answer: Is the Categorical Imperative Simply Bad Math? :)
I'd argue that really the defining strength of humans, is in our capacity to cooperate, in accumulating and sharing knowledge, and actions (I heard recently there is now more weight of concrete on Earth than the entire biomass... 😅). Unfairness, and people not facing justice, weaken social bobds, and capacity to cooperate. Joseph Tainter in The Collapse of Complex Civilisations, makes the case that when these occasions have happened in human history, it's because expanding challenges usually driven or exacerbated by resource depletion, meet weakened or eroding social bonds, that undermine the needed ability to cooperate in facing the challenge. That's the ultimate risk, 'rapid simplification' and dramatic population loss, that we consider to mark civilisational collapse. We certainly know climate change is going to present unprecedented challenges, and I'd say our readiness to meet the challenges is certainly not increasing at a rate to match. It's already inevitable that around a third of Florida including Miami, and large chunks of London and New York will at least temporarily dissappear under floods before the turn of the next century. And regarding the many flooded coastal cities and unlivably hot and humid ones with a continental-climate, we are unlikely to cope even peacefully never mind fairly with the refugees. The aftermath of Hurricane Katrina as described in A Paradise Built in Hell: The Extraordinary Communities That Arise in Disaster is a clear reminder what can go wrong, and to frustrate our widespread urge to help each other in troubled times.
The interaction between specific instances of people getting away with grievous immorality or injustie, and the undermining of social norms, is complex. I got thinking hiw the story of Sisyphus, and Midas, among others in Ancient Greek Mythology, seem to be about these absolute monarchs committing crimes and 'getting away with it', but having that turned into a story of after-life or cosmic justice. The process of hunting down Nazi leaders that escaped after WW2, and the story-telling trope of that, bears comparison. Donald Hoffman argues in Do We See Reality As It Is, that we can expect some systemic distortions in our perceptions, because they serve our wellbeing. I suggest a sense that there is cosmic justice is one such, and that's why we find it in almost every culture in the world. The greatest injustice a violator can perpetrate, is to make us stop believing in justice. It is not just a hope, it is a need, with social cohesion at risk if we lose it. There's a quote out there that societies rapidly fall apart when there's no food, and when there's no trust, but the loss of trust is worse.
Foucault is very interesting on the morality of punishment, in Discipline and Punish: The Birth of the Prison. It' s a shirt, very readable, thought provoking book, that I heartily recommend.