It’s incredibly infuriating, but I would just put it to the back of your mind. The faceless front of HR is not going to care about your record prior to this - it’s literally the ‘beep boop, rule broken’ of a machine.
What does matter is that the people close to you - your colleagues, your manager etc - have supported you strongly throughout. They will have done so partly because you do have such a good reputation through your work ethic.
It is absolutely, completely, totally and utterly unfair. I have been there myself. But it’s also not worth giving it any brain space.
If there are no consequences, try to forget it and move on. Keep it in your mind for when people try to convince you not to retire - or even if they try to convince you to take on more tasks than you’re ready for. If you take on more and fail, they’ll send another letter - so don’t be afraid of using Occupational Health to slow down your return to work if needs be, or of exploring early retirement as you’d mentioned previously.
Crap though, mate. I really feel for you.