Read the comments after this answer for quick steps.
Having your battery disconnected made it all back to normal temporarily. see what you did?
Jerking. kicking, bucking; low power, wont accellerate, max speed of 40, sputtering when throttle is opened up. (there is no mention of service engine soon light) but this is how You reported your symptoms, correct?
Then you "replaced the battery, and everything was fine."
Do you suppose it is in FMEM leading to LOS ?
These are fuel delivery plans your computer uses when it has to plan a strategy around bad information. (sensors out of range)
Since it cannot respond directly to the false or missing data, it has a preset plan parameter to stay running but get you to the FORD service department.
If you keep driving it till the service engine soon light bulb burns out !
It goes into an LOS strategy. This deliberately tries to foul the plugs and eat all your gas to make you get some diagnostic help.
The laws against pollution have mandated this sort of (self destruct), because it cannot use fuel safely.
Those driveability issues are a few parts designed to control and manage the system acting up.
They set codes. they have simple tests and inspections to perform.
The loss of some sensors reporting right also affects transmission shifting. This will shorten the life of the trans.
The MAP or MAF reading out of spec affects the response as well.
Like a simple engine if you put a vacuum gauge on it and then deliberately turned the idle mixture out of spec, the gauge drops and wavers as the idle surges and self revs till it fouls plugs and dies.
Limiting what the car will do is programmed into its self running plan. It cannot breathe right and it is going to hurt the catalytic converter if you keep trying to operate it under that strategy.
I would disconnect the battery, change the spark plugs, and then drive it a complete drive cycle.
Then read the codes in the memory at the parts store.
Google those codes to understand them.
If you cannot tell hard faults from memory codes, then you must seek help from a technician. get your part list from your results of tests, and start repairing or replacing as it indicates.
This is why Ford has a service department who helps people run cars responsibly and helps them understand their vehicle issues.