That's why the competitive scene maintains a listing of tiers across generations derived from analyzing the actual usages across thoughful battles. https://www.smogon.com/sm/articles/sm_tiers
But Slaking doesn't get that for free-- it has an ability (Truant) that means it can only use moves every other turn. That limits its usefulness outside of a couple very specific scenarios, and means that it'll usually be outperformed by significantly "weaker" Pokemon (going purely by numbers).
And that's just one of the factors you'd need to take into account to build a team optimizer that's actually useful. Actually building a team has to take into account a massive number of factors: roles for each Pokemon (not just what types they can counter), available movesets, any advantages or disadvantages provided by abilities, your opponents' team composition, etc... it's a big problem to try to solve.
For the mainline games it usually does not matter. You can beat it with any single Pokémon pretty much.
It is completely true to say that the so-called 'box legendaries' specifically - with base stat totals in the 670-700 range - tend to be excellent Pokemon and with rare exceptions are banned from 'standard' formats for being overcentralizing.
He also does some bad Pokemon challenges to see if it’s possible to finish with, say, a Weedle (mostly no).
That said, complexity emerges and explodes in the tiny differences, even if there's like 8 pokemon that are in 95% of teams, and 10 situational pokemon that appear 5% of the times, that's like C(6,8) teams which is like 56 possible teams of Uber pokemon, and a buttload of possible teams with situational pokemon like choice scarf ditto, eviolite Chansey, nuzzle u-turn super fang pachirisu, etc...
Even if the teams were the same, just the possible differences in movesets create a lot of different sets, suppose 6 possible moves for each mon, you have C(4,6) sets for each mon, each with their own probability weight as well.
The Smogon tiers (NU, RU, UU, UUBL, OU, Uber) is a thorough attempt at placing all pokemon in tiers based on overall power level and to make interesting balanced matches at different tiers.
So each player comes with three teams of small, mid and large base stat classes. You can't repeat monster across teams. Whoever wins 2/3 wins the match.
...
And if this was my college house, we would have a price system for the mons so you wouldn't be able to repeat mons even between players. But that's a different thing altogether.
My general problem with Pokémon (at least the older versions, haven't played the latest) is that when playing against others it frequently just boils down to the same set of legendary and overpowered mons.
You sort of addressed this running the milp without certain mons as options, which makes sense.
But you already have the machinery for a better constraint: max total base stat. You could think of it as "weight classes" in box.
So, for a given weight class, your team can only add up to Y in total base stat. You can squeeze one of the OP mons, but then the rest are slackers. Or you could balance them.
It makes it a lot more interesting and invites for diversity. And you could run it for many different values of Y.