Manual or auto? Auto, I'd just let it do it's thing. Manual, I'd shift up. Either way, I guess I don't understand why you're up to 5-6k when you just have to stop anyway. Well, never mind about that.
I don't think the knock sensor causes the stalling when you drop from 6k to idle. I think that's caused by mis-adjusted idle-control system.
Vacuum leaks?
Throttle body dirty & sticking?
Misguided 'mechanic' tightened the throttle cable to raise idle RPM?
Fix that stuff, adjust your BASE idle (that's different from the operating idle), & then reset your ECU. Start the engine & allow it to warm up to operating temperature WITHOUT TOUCHING THE GAS PEDAL the entire time. This allows the ECU to re-learn the behavior of the idle control system.