Then your premise is inherently incorrect. A Barbarian with 8 STR and a Greatclub will still deal damage.
Excu-***ing-me?
You are the one who generated the hypothetical of a bad-damage dealing Barbarian and a attacking-with-a-staff-STR Wizard.
I only talked about a Barbarian and a Wizard being in melee range with an Ogre, which is far from dumb.
You are also the one who added the Rogue to this "dumb hypothetical", btw.
And as demonstrated earlier, a Barbarian with STR 8 and a Greatclub will still deal damage, even if it's a small amount.
Once again, your own arguments defeat themselves.
The 8-STR-Greatclub-Barbarian is bad at dealing damage, but will damage the Ogre. They are capable of taking the Ogre's attacks
The Staff-18-STR-Wizard is better at dealing damage, and will damage the Ogre. They are not capable of taking the Ogre's attacks.
The 6-CON-Rogue is the best at dealing damage, and will damage the Ogre. They are not capable of taking the Ogre's attacks.
So, once more: either you stick with your earlier logic of "best damage = target = tank must do best damage", or you admit that one can tank despite doing less damage than their allies.
In both case, the wizard is still the worst tank of the 3 as they're either not dealing enough damage to attract the aggro or not likely able to survive the attacks of the Ogre.
Also, saying "doing zero of a good thing makes you better at that thing than someone doing a small amount of that good thing" doesn't make sense, because while dealing damage is a good thing, the specific good thing the Barbarian wants to do in that hypothetical is tanking. So yes, doing 0 of X does not mean you cannot do Y, even if someone else does 1 of X.
But in any case, I reiterate that you don't need to do damage to tank. You can tank while under the effects of Sanctuary, in some cases. You need to make yourself a worthwhile target, which can be made through dealing damage, but also by a variety of other ways.
What it takes to make one a worthwhile target depends of the opponent, of course. Ogres aren't known for leaving someone who spit in their face unpunished, for example. An intelligent enemy may avoid attacking someone who cast Sanctuary on themselves, while a beast would likely see no problem at keeping attacking as they don't realize the magical effect they're under.