software first. team second.
team happiness is important as a miserable team will hamper productivity and quality. but the team’s happiness is secondary to their overarching reason d’être — the software.
if there were no need for the software, the team wouldn’t need to exist. so that goal should take precedence.
YMMV