As for the inappropriate words, you'll have to filter them out somehow. This has always been a little bit tricky, as people like to get creative with stuff like A$$ or A.S.S and such. Also you have to avoid filtering out common words like ASSemble just because they contain a no-no word. There's probably some libraries out there (https://www.npmjs.com/package/bad-words) or javascript code (https://stackoverflow.com/questions/56456144/javascript-simple-profanity-filter) but ideally you'd do that server-side and not client-side.
And for sending scores every second, it depends a little on how the game is designed. But if you could e.g. only allow to send the score if it's a new highscore. Or there is some kind of timeout. Or it's only possible to send the score after a finished game.