"Given the opportunity, players will optimize the fun out of a game" it often doesnt matter what's the most fun it matters what works well, if the best way to win is boring people will do that 90% of the time, its the developers job to make sure the best way to win is Not boring but Also that other ways to play are also fun and viable, players may never Try other strategies if there arent situations that force them into them.
aside from that "if the players are having fun, don't get in their way." isn't even a valid rule because if that was actually a cardinal rule of game design, you shouldnt even have anything like a death mechanic. Why would the player be able to take damage, thats just getting in the way of them winning. A game should provide interesting challenges to a player, and if you can "win" at the game by doing the same thing over and over again when there are a lot of different and interesting ways to play, not having parts of the game that nudge (or sometimes force) a player into those is a shame.