First off, you can't compare a cheated sword that does 9999 dmg grants you immunity to everything ect ect, to the robe of Vecna, which while powerfull for a mage, is still on a completely diffrent and much lower order of magnitude.
An equivelent Robe for a mage would grant the same immunities, lower casting time by 10 and grant you permanant imroved alcracity.
as for a fight between a barbarian and a mage, any competent mage could totally mop the floor with a barbarian (skill being equal) within 2-3 rounds useing any combination of time stop, imprison, spell tirggers, chain contingencies, mindflaying, and mislead clones/similarcum
and regardning mind flayers, every attack during a timestop hits and subtracts 5 from your INT score my mage needs 5 attacks in two rounds of time stop assuming you've somehow achieved a INT of 25. got only 10 ?? tough luck 2 hit KO