Unless you are the .1% of developer (and probably with a heaping helping of luck) you aren't going to end up working someplace that isn't terminally dysfunctional no matter how much you polish your resume.
Being in the top 0.001% of developers won’t help if you don’t have a large network or good brand
Besides, who wants to work with someone that’s only worked in these terminally dysfunctional workplaces. There must be something wrong with them.