The best jobs I've found are at smallish companies with reasonable chance of growing revenues that are just past the startup phase, and over the initial politics that comes from growing. They have enough job security to make it comfortable but still have the opportunity for a person to make significant impact, and usually a mixture of legacy and new project code base. Some technical debt to fix from the startup-sprint phase.
I've worked at net-new startups, very large companies, and companies like I've described above. I miss the comraderie of a team under a dozen people making good progress and with everyone able to make good impact without being a superstar.