My first thought was that wearing the damaged hat was a punishment. I was going to say that you can be miffed if you like, but it's really not up to you to police anyone else's parenting decisions. You know what - I've let my 4 year old play with gifts given to my 2 year old. There were various good reasons. If the gifter had come and complained about the way I managed the belongings of my children, they'd be welcome not to give gifts any more. And if they berated my 4 year old every time they saw her using the object, they wouldn't be seeing us any more.
And even with your update giving the reasons why the 5 year old was given the hat, it's still not the giver's job to police how the gift is used once it's in the other family's possession. It does sound like a really sad situation, but criticising other people's parenting isn't OK.
I can't think of any gifts that a 3 year old would love that a 5 year old wouldn't be able to take. This would probably grate on every nerve after the hat incident. but could you get each a smaller gift on their birthday, and give the other the exact same thing. So both girls get identical gifts on each others' birthdays to the birthday girl.
It doesn't teach the 5 year-old to respect her sister's belongings, but that's not your job anyway. It would mean that the 3 year old might be able to use her gift, though.