It's a bit difficult to explain exactly what I'm getting at, so I'll give an example:
If I get on the bus for work at 8:00 (having to be there at 9:00), there will be a traffic jam and it will take an hour and a half to get there, making me late. However, if I leave for work at 7:30, an hour and a half before I need to be at work, there will be no traffic jam and it will only take forty-five minutes to get there, so I'll arrive at work earlier than I need to. Let's assume for the sake of the question that:
there is no middle ground (If I leave any later than 7:30, the bus will be caught in a traffic jam and I will be late; if I leave at 7:30 or earlier, I will arrive much earlier than is necessary.)
arriving early is not a bad thing (i.e. a "neutral"/acceptable outcome)
Is there a phrase/expression for this situation that is reminiscent of a Catch-22 or the expression "damned if you do, damned if you don't," but differs in that rather than
the solution renders itself unnecessary (without creating any negative consequences, the solution simply "oversolves" the problem?
1 - When I originally posted, I think the bus example drew focus away from the real core of the question, so I wanted to add one more (brief) example. Say you're at the supermarket buying hot dogs and buns. The buns only come in packages of six, and the hot dogs only come in packages of eight. To have enough buns, you'll have to buy a second package, but then you'll be left with more buns than you need. (Note to pedants: Assume you're specifically planning to feed eight people and they all definitely only want one hot dog each.)
2 - I think two of the existing answers--"necessary overkill" and "inescapable overcompensation"--are excellent and come quite close, but I'd like to see if there is some other idiomatic, "on-the-nose" phrase for this kind of situation.