Completely ignoring whos code this is, lets look at it as a process of elimination.
It is intermittant and the car as you say, is capable of producing what it should when it gets it right. Yes?
The code is a fixed set of values that doesn't change (until you do it with the SPS). The ECU is what manages those values, so it requests X based on those and if the engine gives X then everything is fine, if the ECU gets Y, then it'll do what it thinks is best - which could be anything from backing it off 5% to having a total spaz and putting it into limp mode.
It could be a bug in the code, there might be a value based on the assumption that X piece of hardware exists, when in fact it in a smal minority of cases it is Y and therefore doesn't perform in the way they expect. But then why is it fine when it gets it right?
Are there certain situations that the fault is more apparent, when it is hot, WOT, etc etc? I assume you have logs from when the car faults? What is different?
There's plenty of things that don't register either. We found with my old car that when the butterfly stuck on the EGR valve because it was full of oily goo it'd choke the car for a moment and cause it to stutter. Nothing in the logs indicated this was happening, we found it by chance. Likewise when the actuator was sticking, it'd request boost, not get it and back off, then the actuator would come free and deliver a sh*t load in one lump.
The wrong low pressure fuel sensor didn't register either, there could be a load of other similar examples too.
Asking a map writer to diagnose a fault is difficult. They only know so much and although many deviations in logs point to certain areas of failure, without a hard fault code, it's a best guess. Common faults you get to know, something strange and where do you start? That's why someone's eyes and hands are essential at the same time.
What you need to do is stop scattergunning bits at the car, you've wasted a grand so far either by your desperation to fix it, or by someone else's bad advice. You can't diagnose a fault by throwing stuff at it.
I'm sure someone on here can help if you post up all the fault logging stuff.