This is, in fact, often a major question in game design too. When the problem space gets reduced to a score optimization problem(whether score in the context is "high score" or "maximizing some form of output" like HP damage), you often end up with degenerate solutions that involve a repetitive linear application of some technique. And when this appears in a competitive context, the game starts stagnating into a rote exercise of min-max, and other solution sets go unexplored. Competitive players often look for ways to gatekeep and declare a playstyle unacceptable so that they stay in their comfort zone and keep their status - but acceptability is ultimately a matter of what you believe the competition is or should be about. If you don't have that agreement of shared belief, the game itself falls into incoherence, and that is what we see at a broader scale in society where its systems fail.
But there are some answers. One is to enforce a broad set of all-or-nothing contractual failure modes: If you fail the minimums you don't get the maximum. At a baseline we have Maslow's hierarchy of needs setting some of these minimums. And our legal system often works in this direction of adding a minimum. Another is to add buffers, delays and noise on results: If you don't have an instant guaranteed outcome, you can't push your margins nearly as hard, and so you don't end up in a distorted min-maxing zone, but a more systematic one, which can only be manipulated through careful synchronization that "gets ahead of" or "applies leverage" to the problem. This is something we're now dealing with increasingly in an interconnected "instant society" where continuous access is the norm and many activities that were one arduous and needed a strong commitment have been reduced and repackaged into status symbols. Lastly, overt market mechanisms - pricing and bidding and ownership - help when applied appropriately. But they are premised on active participation in the process, humans in the loop who can really think through all the factors. When we automate market activities, we end up back in the scenario of min-maxing.
Lots of fun things to think about. It's not just the building that matters, but the "why" of it. If you can justify the "why" you can get a lot farther.