The product manager is directly responsible for engineer morale
Engineer morale is directly tied to the product manager. The PM must involve them on the level of being part of the team, being a missionary to solve the user problem, being a part of the creative solution making process. If they ever feel like mercenaries, whose only job is to do what they're told, then the product manager is failing. The PM should share customer problems, challenges, and failures openly with the engineers and they will often rise to the challenge of helping to solve them.