It’s not really revenge, but I was released in a corporate ’downsizing’ based on a merger. Almost right away, my peer in another region and my last boss were released and were asking me for referrals and advice on new assignments since they were fired, too. Less than a year later, the one who took over my roles was walked out with an escort to avoid any conflict at firing time. (Note that I was given 30 days on the job to depart and actually had to be reminded to stop coming in despite the fact that they were still paying me 30 days beyond that :) .
I came back to do some contract work for that company nearly a decade later, and the work that I put in place was still being used. Nothing my boss or my replacement did had changed it. My team was a decade ahead of the industry in making that work happen for the business. Just seeing what we put in place still being used and just as effective as we intended for it to be was enough satisfaction, likely as much as any revenge could bring.