Weird. I’ve never seen this before. I would tend to think that Emacs isn’t becoming the key application and therefore you’re actually typing into the terminal window. If you select another application, then go back to Emacs does it still type into the terminal or that other application?
Does “emacs -Q” work?
Glad you got round it. It’s still very weird, though. I wonder if there was some sort of problem specifically with the brew cask build.