For me, as important as any of these factors is “who are you building it with”. Great teammates and a great manager can go a really long way towards job satisfaction.
Surely direction has to be more important?
A great team is great, but not if "we're on a road to nowhere".
And even a good (or possibly mediocre) team with a great direction, a noble goal, must be better than a great team with a dead-end direction, because people will sacrifice and put up with all kinds of politics if the cause is worthy, if there are lives on the line.