Sounds like low fluid which can cause lack of shifting. Other things though, the cable being disconnected and it shifting indicates a controller getting a bad signal (or a bad controller). Yeah that could be an ESM switch, disconnect the switch with the tranny computer plugged in and see what happens. The controller is usually somewhere close to the tranny and the solenoid pack is in the tranny. If it was shifting before it could just be a signal issue. Other things include bad connector/s, or wires grounding or shorting out. Try the switch bit first and sourcing things from salvage yards aren't always a bad idea but you also don't always get good parts, so just keep that in mind. Nice work on the clearing up the idle.