I think we as a society need to be a bit less sensitive about gifts. I think it is fine to not like a gift. What matters is that they thought of you to get something. Sometimes it won't land. It is better to admit that (if necessary) than hide it forever. It isn't my responsibility to love and care for a give that you give me.
I get you something I don't want it wasting space in your house just because you are afraid I will be offended. That is like the worst outcome of a gift, I don't want to be giving you a burden.
So if the kid is no longer interested in the toy I think it is fine to give it away or otherwise get rid of it. If the person is offended they should chill the fuck out.