That was actually my idea :)
Ok I know that creating an E-field that exactly cancels the Lorentz force is going to be very difficult, maybe even impossible, since the Lorentz force, created by the inhomogeneous magnetic field, is not going to be the same at every point of the field, but I guess...