The desired effect may just be too complicated…
The first spell commonly available to move a foe to another plane is, in fact, the 5th-level cleric spell plane shift [conj] (Player's Handbook 262). Its low level compared to the sorcerer/wizard version means that a high-level cleric can prepare several such spells—enough, anyway, for an infiltration mission during which foes are to be dispatched to other dimensions yet not—deliberately nor technically—outright killed.
Using the spell plane shift in such a fashion still carries with it some risk: if the caster says, "I plane shift the guard to Mechanus," for example, either the spell fails because Mechanus is no more a destination than the Material Plane or the DM randomly determines where on Mechanus the poor guard ends up. This is less of an issue if the cleric does have a destination in mind ("Because everybody loves the City of Brass, right?"), but the subject will still be from 5 to 500 miles away from that destination, which could be fatal if the destination is on, for instance, the Elemental Plane of Fire.
(A unique case is when a creature's sent to the Seven Mounting Heavens of Celestia: folks sent to that plane always end up on the shores of the lake surrounding the base of Mount Celestia, and probably near an inquisitive angel bear. I wish I were kidding.)
The 7th-level cleric spell greater plane shift [conj] (Spell Compendium 159) solves the off-target issue, but the caster must've once visited the destination, and the spell's higher level means devoting even greater resources to multiple castings.
Enough gold solves at least some of volume problem, though. If the caster can modify the spell plane shift et al. with the metamagic feat Reach Spell (Complete Divine 84)—it's level adjustment is usually +2 but ways to mitigate that exist—, the caster can employ an expensive metamagic rod of chaining (Magic Item Compendium 164) and, possibly, disappear all at once a bunch of guards (if they possess not-very-good Willpower saving throw bonuses, anyway).
Keep in mind, though, that spells like plane shift typically don't enable the subject to return to its starting plane. Once the subject's affected, the subject's on its own on that new plane, and that might as well be a death sentence (or at least a sad sentence) if, for instance, the subject's a generic level 4 human warrior or whatever.
Other effects can do similar things. A trap could be set by a high-level caster using the 4th-level Sor/Wiz spell desert diversion [conj] (Sandstorm 113-4) on the infiltrator's own high-level method of entry into the facility, for instance, and such a portal'll briefly zap away investigators to a distant wasteland, but that's sloppy and unreliable without another spell like the 8th-level Sor/Wiz spell sympathy [ench] (PH 292) or something. And the 8th-level Sor/Wiz spell maze [conj] (PH 252) does just about exactly what you want, but, it, too, uses an 8th-level spell to avoid killing folks, making it, frankly, excessive.
…How about something simpler?
Ideally, the infiltrator'd use the 3rd-level psion/wilder power time hop [psychoportation] (Expanded Psionics Handbook 137), but, unfortunately, psionics are unavailable. However, the existence of an effect like time hop raises the possibility of a traditional caster researching a similar original spell (DMG 198). There are, after all, mechanics for such an effect already.
But let's keep in mind the goal: make guards temporarily unaware of actions taking place around them in a nonviolent fashion so that they can't testify as to what the infiltrator did. May I suggest the humble, reliable, 40-year-old 1st-level Sor/Wiz spell sleep [ench] (PH 280)? And it's big brother, the 3rd-level Sor/Wiz spell deep slumber [ench] (PH 217)? Combined with the 4th-level Sor/Wiz spell greater invisibility [illus] (PH 245), the caster should be able to get near enough to use these spells and render the victims insensate so that the caster can go about his task undisturbed, and the victims'll awaken undamaged, hopefully (if the caster's quick enough) after the caster's departure. The metamagic feat Silent Spell (PH 100) and the 2nd-level cleric spell silence [illus] (PH 279) may be of use to the infiltrator, and the object upon which the silence spell's cast could even be [cue dramatic music] a clue!
Such a workaround also eliminates the need for the caster to create a demiplane that erases memories (an unlikely prospect anyway as memory isn't a planar trait that can be specified even with a generous reading of the 9th-level spell genesis).