Some bottom-of-the-barrel firehouses will absolutely disqualify themselves through their signaling in interview loops. But I think the reality is that at most places the dysfunction just won't become evident until you've been working there for a bit and the cracks start showing.
Which brings us back to another huge advantage of tech -- I think the "safest" landing spot (assuming your personal non-negotiables are satisfied) is the spot that gives you the most financial security to leave when you've seen enough. Assuming you have a good handle on your standards/costs of living and risk tolerance, after a certain breakpoint, more money saved means more time and less time-pressure to find the signals you care about. I don't think a "dream job" exists for me, but a better one always does.
This has been my experience too.
Companies rigorously test candidates for the right fit.
But I have not yet found how to accurately test for a company with a sane healthy working environment.
I haven't found any, my work history is littered with terribly managed companies where nepotism is more important than competence, business people run tech departments with no tech experience, had a CEO go to jail for bribery which shut the company down, another company my entire team was let go 6 months after I started. Recruiters and companies who ghost you during applications with out even a polite no thanks email.
I was raised by boomers who taught me if you just work hard and do the right thing your company will reward you but that has not even remotely miniscuely been my experience in the tech world.
Heard even a FAANG can be a nightmare if on the wrong team.
So how to identify a safe landing spot?