Law and justice are not opposites.
The law is justice, but the law enforcement judiciary does not have to be.
Poirot's choice does not mean that the law bows to justice, but that, as a non-public official who knows the truth, in the fierce ideological struggle, he chose to show mercy to the weak to defend their rights.
This process embodies the brilliance of his humanity, which is the gist of the whole story.
As for how to get the law to represent justice and thereby eliminate this "private trial", that is not what this story explores.
View more about Murder on the Orient Express reviews