2010 Ford Escape...Engine problem?

I’m visiting some friends in a small town and the one mechanic here says he can’t get a proper reading on the engine to determine what’s wrong and that I need to get it to a dealer. He said there is some kind of code that comes up on the scan but it’s nothing that makes sense or it’s some kind of error code or something. What’s happening is this:

Check Engine light is on
Engine stalls when in idle
After I finally get the engine revved long enough to pull out, the accelerator does nothing the first few times you push it and then it will lurch forward, but only for a couple seconds and then the accelerator does nothing again. It doesn’t actually stall out at this point. The engine is still putting, but barely and then the same cycle happens again. It will lurch forward and then nothing. I can get it going on the highway if I put the pedal to the floor. It will rev up before actually lurching forward and then when I get it past what feels like first and maybe second gear it seems to behave more normally, but the engine still sounds like it is laboring much harder than usual.
I don’t know if this is related or not, but I also get a light occasionally that says, “Check Fuel Fill Inlet.” Usually when that happens it goes away after the next time I fill up. It has one of those capless fuel systems so it’s not that the cap is not on tight enough.

So my questions besides any ideas about what might be going on are:

Do I really need to take it to a dealer (which would be at least 40 miles away) or should I try another mechanic that’s closer?
With the problems that it’s having is it OK to risk driving it to the other mechanic/dealer (especially if it’s 40 miles away), or should I have it towed?

Does the engine rev and it does not go or when you push the gas you get no engine response? There is a position potentiometer that feeds the computer and a motor that drives the throttle plate. Either could be bad. Or if the engine runs and it goes no where then you have a tranny problem. I would not drive it.

Here is the throttle picture.

40 miles is CLOSE in my terms
( dealers for brands like BMW, Mercedes, Volvo, Honda, Subaru and others are a HUNDRED and forty miles one way )
Take it to the dealer to define this unknown code for more assistance from this forum.

A first guess from my peanut gallery suggests ;
Clean the mass air flow sensor. You may find that debris or a bug is in there. We’ve seen it before replicating a fuel pump style issue.

The accelerator gives no response from the engine the first few times I hit it and then on the 3rd or 4th time it revs and then lurches.

Thank you for the advice so far. I guess I will have to have it towed tot he dealer. :-/

It’s either the pedal pot or motor.

Turned out to be something with the throttle. Unfortunately, when mechanics talk mechanics to me it’s like the teacher on Charlie Brown. “Wah wa wa wa wah wah wah.” Otherwise I would let you know more in detail. Probably what you mentioned about the throttle. Not as bad as I feel like it could have been. Including the towing the bill is about $250. I apparently have some warranty still in affect too or it would have been more like $500.

The trouble was most likely with the TPS or throttle position sensor. A problem with it could cause the trouble you describe along with generating an error code that would turn on the CEL light.

I might be thinking of a different Ford but they were having a problem with the throttle bodies and there was a nation-wide back-order on them to replace them. I think it was the motor in them or something that had to be redesigned.