I had Rosetta well before I ran into these issues, I think Homebrew still required it when I got the computer.
Before I figured out the way to identify the offending dependencies I sorted the issue through signing the executable with codesign, in a way that required me to disable part of SIP. So the code was working, it was just not being allowed to run.
I can see brew trying to run x64 code while the emulator isn’t there blocking code from running in weird ways.
Alternatively, it might be that package updates fixed the packages that behaved incorrectly. Again, just a slightly educated guess.