Rowling is OK with fan-based HP writing if it isn't commercial, isn't obscene, and is not credited to whoever produced it and not to her [1]. There's probably a decent chance she would be OK with this if it is free.
Nintendo sends cease and desists to a lot of free (as in beer or speech) projects. Some companies bully hard, I think Warner Bros is likely heavy-handed on Harry Potter.
[1] https://fanlore.org/wiki/Rowling_backs_Potter_fan_fiction