I haven't been wronged in such a way that I'd want to record it honestly, and I feel that it would tarnish my passing for myself by doing so (like the moments leading up to it, and contemplating how things will go afterwards). Also I've learned to forget more and just not retain memories so I honestly don't even remember things or hold grudges as much as I used to. In the end, I think the people who have hurt me the most are those I care about, and they most likely didn't mean to. I try not to hold things against them and letting myself forget helps there too. If someone had more obviously wronged me who I didn't have such connections to, I don't know, but I don't think I ever would. I've never been inclined to be very angry, just sad. I'd rather leave on a good note if possible as well. It feels more peaceful than leaving resentful.
But I'm not in your position nor do I know how bad what they did to you was. I've read before where people say they regret not doing more when those who hurt them go on to hurt others. So perhaps they should be called out for what they've done. But if you only do so in a note, then you don't really reap any benefits that might come about following that, and you might just impact how you feel before leaving. But if it brings you peace that's something to consider as well. So I'd say if it's useful for you to write about, then go for it, or if you think it could help anyone else then it's probably also worth it. But if you're gone they might not be able to back up any of your claims since you can no longer testify. In the end it's your notes/letters, so do what you feel is best for you, or what will bring you peace. Best wishes whatever you decide to do.