The tricky thing about this question is that a great company for one person could be a terrible company for another, and vice versa.
Based on your description, it sounds like you're looking for a smaller company where the CEO is technical, and understands what the developers are doing.
This is probably an under talked-about part of the interview process: that you should be interviewing the company as much as the company is interviewing you.
This is the right answer. The size of the company also often has a lot to do with different mindsets and what fits for some people. Some people like the relative stability of a large corporation (you're more of a "number" but you are more likely to be able take a paycheck and clock out mindlessly), the pace and learning curve of an agency/startup (higher risk/reward threshold, wildly wonky work-life balance), or even consulting as a different career path for more independent types.
Based on your description, it sounds like you're looking for a smaller company where the CEO is technical, and understands what the developers are doing.
This is probably an under talked-about part of the interview process: that you should be interviewing the company as much as the company is interviewing you.
No easy answers here I think...