It would only work in the web viewer though. Anyone could still clone the repo and see the original commit messages with their author name and email etc. These can’t be redacted/hidden in the git history as they are part of the hash that forms the commit SHA.
The better option would be for the team working on this project to just change their local git config for that repository to use a pseudonym/fake email address so that all their commits in git itself show up as being from that author/committer.
They can still use their actual github account to push etc as GitHub doesn’t care whether the commit says it’s by the person pushing or not. If there’s no GitHub user account for the email on the commit GitHub just shows the commit author name without linking it to a user profile.
Obviously this would only solve the issues for commits – pull requests, issues, review comments etc would still show up as being from the logged-in GitHub user.