Nope, programming out the ability to shoot yourself in the foot is exactly the right thing to do.
1) Not playing the game optimally is shooting yourself in the foot.
2) If an optimal strategy is known, it is automatable and the player is unneeded. The game is solved
. See tic tac toe or checkers for an example.
3) If the game is not solved, you can't ever really say that you can judge whether a move is good or bad automatically. Especially if you want super overarching heuristics like "more than x storage is always bad". This is why player skill in unsolved games has to be calculated based on wins and losses rather than mexes and storages.
If you remove storage they will just build 90 caretakers / identical factories / Desolators / Pylons / circular walls around their base. Clearly, this is not enough.
I have a modest proposal that is guaranteed to work instead. As you can see, we cant determine footgunning in unsolved games. So the obvious solution is to make ZK solvable by paring down its complexity until it can be solved. We can begin by reducing map size to 8x8 px, removing fog of war and
terrain as a mechanics, limiting game size to only 1v1, and leaving only two unit types, both with just 1 hitpoint.
Once we solve the resulting game, noone will ever be able to shoot themselves in the foot because we will replace all the fallible players with copies of the mathematically perfect, immortal algorithm for playing the game optimally.