I have always tired to find teams/companies with engineers smarter/more experienced than I am. As long as I work with people I can learn from I have avoided stagnation. This can be true in "tech" or non tech companies. The real challenge is identifying engineers who are worth learning from. As soon as I am not learning and growing, I take it as a sign its time to move on.