What I've found is that you should be building teams where you "give a shit about the people". That doesn't mean that we don't work hard and that we don't tackle interesting problems. It does mean that we plan for the long term and pace things accordingly. That you make opportunities for people to grow both technically and in their career. That we succeed as a team and not due to the rock-star behavior of one or two individuals.
My experience is this builds high-trust teams that are resilient, adaptable and often product even better work than teams who over-index on the domain space. They bring diverse perspective and have significant less turn-over which is a compounding effect. While the tech stack or product you built is important, in the end it was the team that created it and where you should invest if you want to continue to see success over time.