First, you need good track signal where you are doing this. PS2 engines should be charged and PS3 need to sit on powered track for a little while before attempting the change.
I find the remote will just re-add an engine with the address it had, if that's open. So a manual change of address is needed or a factory reset of the engine to clear that address.
Now, you state you did a factory reset and yet it still stuck. So there must be something wrong. I would bet you have weak signal or some communication issue?
I would suggest doing this on a test track set up just for this operation.
What model TIU are you using? what are you powering the track with? Have you done a signal test?