I think I'd advise the reverse, at least in terms of company size. A small company is more likely to value you for what you do, rather than want to replace you because your salary has become "too high". The small company I work for has a family feel to it, with zero office politics, but possibly not the same career advancement possibilities you'd get at a megacorp.
Perhaps startups are a special case; an established small company will be more stable. Or at least, your future is tied more to the performance of the company than the whims of those above you.