How much latency should I expect in the electromagnet? The force has to decay over a small increment of time--it can't be instantaneous. I don't know how to test for this or how to calculate the effect (if it's even real). That's the last possible error I can think of.
Yes, the magnetic field takes time to dissipate inversely proportional to the back EMF from the coil
at switch off.
Typically an electromagnet is driven using a free-wheel diode across the coil to protect the transistor
doing the switching. This makes the switch off about the slowest it can possibly be though.
Using a resistor or TVS diode allows a higher back EMF voltage at turn off to speed up the turn off.
The higher the voltage the quicker the turn off, but without some limit the electromagnet will generate
extremely large voltages and just fry the transistor.
Ideally you'd use a high voltage transistor and TVS diode (or MOV as voltage limiter) for snubbing
at high voltage. This gives the quickest turn off of the magnetic field.
There is another effect though, which may be relevant, which is remanence in the magnetic
core of the magnet - this might take a while to decay even if the current in the coil falls to zero
very rapidly. It depends on the nature of the core. If its silicon steel laminations it is likely to
decay rapidly, if a lump of soft iron I'm not sure. Also there will be eddy current effects with a
lump of solid metal.