Assuming the engine is structurally in good condition , it needs 3 things to run:
1)Air
2)Petrol
3)A spark.
There are sensors on the air intake manifold which monitor volume and pressure plus the throttle body with the IAC.
The Petrol supply starts from the tank, lift pump, VST,high pressure pump and filter, goes to the rail and excess is returned to the VST through the pressure regulator which in turn is driven by the intake manifold pressure which in idle allows for more return to the VST and less return when at high rpm/load therefore ensuring that the fuel pressure remains “constant” throughout the rpm range.Any excess fuel in the injector rail goes back to the VST ,more return to VST,less returns at high rpm.
And the third is the ignition -> timing spark plug fouls spark plugs etc.
Forgive me for not going into detail into what you have inspected so far but it should be somewhere in these 3 things.
I copied the following and paste the text:
If an engine is not getting enough fuel (this is called “running lean”), due to fuel pressure (regulated by the fuel pump and regulator), restricted fuel injectors, a vacuum leak or really anything that throws off the fuel mixture going in to the engine, this can cause the surge.
It’s also possible your idle air control motor is going bad. The idle air controller is simply a computer-controlled motor that controls idle. There could also be another sensor that is telling the computer to compensate, and in turn, this causes the idle to surge as it looks for the correct RPM level.
With computer-controlled engines, there is really only one way to figure it out, and that is to hook up a diagnostic scanner to the vehicle’s computer. That is because you need to see what all the sensors are doing in order to narrow down the issue.
It’s never a good idea to replace a part based on a guess, and it will almost always be more cost-effective to pay a repair shop for the time required to run a diagnostic than would be to just start replacing parts.
In case you are still looking to find the problem, you could look into these 3 things Air,Fuel,Spark and assuming there isn’t anything else out of the ordinary.