Good to see you found the problem. Congrats on your persistence.
You might as well clean the IAC when you get a chance. If the EGR passage was clogged the IAC and its passage might not be far behind. It'll smooth out your idle too. Never saw you mention checking the codes on the ECU. It would be interesting to see what codes are there.
I have the same problem with my TB connector. Female connector got brittle, a couple of pieces fell off, and it doesn't snap shut any more. I wrapped a plastic cable tie from end to end around it and pulled it tight. Works great.
