Startups aren't Dilbert land. They literally can't afford it. They have their own pathologies, of course, but they aren't Dilbert pathologies. (And due to scale, if you are motivated, they are often, but not always, more amenable to fixing.)
You can also look around for medium-sized places where software is the primary product; they can typically afford some Dilbertiness, but not too much, or they get eaten by somebody else. Depends on your tolerance, and on your ability to carve your own defensible niche out.
But either way, the key is certainly to start looking. No, working in Dilbert is not inevitable, but you'll have to take positive action if you are stuck there now.
Absolutely. In addition to startups, I've worked with quite a few small-to-medium sized agencies, and as you say, they tend to have a small but manageable amount of Dilbertiness.
As I see it, the crucial difference between Dilbert and non-Dilbert is responsiveness to unhappiness and the ability to learn from failure.
In Dilbert-land, an entire engineering department can grow to be silently miserable. Outside of Dilbert-land, many people would raise their voices and with enough protest, major change would happen. That's because management knows that bad morale is deadly, and can't afford to restaff after mass departures. And outside Dilbert-land, people tend to not see themselves as trapped, and really will, indeed, quit.
Also, medium-sized agencies simply cannot afford to have more than 10% of their projects utterly fail - their cash-flow is too limited, and they live on their reputation and good relationships with clients. Unlike the Dilberts, they simply can't walk straight into failure over and over.
As someone in the orbit of Berlin startup culture, I'd say the answer is simple - you have to overcome arrogance and ageism.
Let's be honest, those of us who have built careers on the "modern-web-stack running in AWS" tend to tilt in the bearded-hipster direction. I've interviewed people coming out of corporate behemoths, and they're typically older, have families, have a more conservative demeanor, and are a few years behind the HN curve, tech-wise. It takes some effort to cross that cultural gap and recognize the decades of engineering and inter-personal experience that some of these people have.
One thing that helped me was to move. That's obviously a big step. I was unmarried at the time, no kids, and knew I wanted something different, so I found a job in a new city and just packed up and moved.
If that's not in the cards, maybe you could look slightly farther afield in your geographical area than you would normally, or look farther afield in your technical area than you normally would.
It might also help to work on some either open source or other public-facing projects (assuming you can and they don't conflict with your current employment, etc.). Then you show that you have experience other than just what you might have from your day job.
I'm not sure what you're getting at. If you're implying that I casually leaped to the conclusion that it's a bad thing, I didn't; I was giving guidelines to someone who seemed to be implying (s)he wanted out. If you don't want out, more power to you; I'm not really a big "you have to be passionate about your job" sort myself. (It's nice, but it's a bonus in most cases rather than a necessity.)
I think I miscommunicated my point. I was speaking of bias against people who have been stuck in Dilbert Land for long periods of time and are trying to get out, but being ignored by companies outside Dilbert Land because they are inside it.
Ah, I see. My apologies for misreading. But, alas, I have no magic answers. Except for the fact, I suppose, that there are no magic answer in general, and you may have to do something a bit spectacular if you want out, to prove to those outside that you can function outside. This is where programmers have it easy; it's really easy to get involved in an open source community or something, compared to a lot of the other people who can get stuck in Dilbert-land.
You can also look around for medium-sized places where software is the primary product; they can typically afford some Dilbertiness, but not too much, or they get eaten by somebody else. Depends on your tolerance, and on your ability to carve your own defensible niche out.
But either way, the key is certainly to start looking. No, working in Dilbert is not inevitable, but you'll have to take positive action if you are stuck there now.