Your question specifically mentioned Act 5, but the best example of poetic justice in Merchant occurs in Act 4--the trial scene. Shylock initially creates the contract between Antonio and himself so that he can get even with his business enemy (Antonio). He knows that by cutting out a pound of flesh from Antonio that it will result in his rival's death, and he will have revenge for the insults that Antonio has leveraged against him. He forgets or is ignorant of, however, the law in Venice which states that if another person seeks the death of a Venetian that the penalty for the perpetrator is death. In Act 4, Portia convinces Shylock that he has won the case and is entitled to his bond, but just in time to spare Antonio's life, Portia reminds Shylock that he must obey the letter of the law (which Shylock had insisted on up to this point); the letter of the law in this case is that Shylock is entitled to flesh only, not blood; so unless he can develop a way to have Antonio's flesh without drawing blood, he cannot abide by the letter of the law himself. In the end, Shylock--who comes to court confident and reveling in his supposed victory--leaves empty handed and without his own faith. The poetic justice is twofold in this act: 1. Shylock wrote the bond/contract thinking that it would cost his enemy everything, but in the end Shylock's own words cost him everything. 2. In the courtroom, Shylock refuses to show mercy, denying the spirit of the law, but then when Portia turns the table on him, he must rely on the mercy of the Duke and Antonio.
In Act 5, the only real poetic justice is perhaps the news being brought back to Belmont that Jessica and Lorenzo who were despised by Shylock will inherit his wealth and home upon his death.