I'm going to put money on it being the EVAP system. I have a P0446 code that took over 1000 miles to pop back up, and I had horrible idle and acceleration when it did. It was undrivable.
Might be an electrical connection for an EVAP component? That would explain it going out only every so often.
P.S. I am not a mechanic, so take my words with salt

I can get my way around most vehicles though!