Again, thanks for the answer, but actually it is not very complicated to access the original order of a refund which will provide all the information necessary.
I would love to contribute, but tried to use this for a very old WC version (2.9) and of course it won’t work with it.
So I have to write my own plugin.