Welcome to TRS
It would be good to include your definitions with the code numbers, just so we are on the same page
Here are the ones I have, from this page:
https://www.therangerstation.com/tech_library/3digitcodes.shtml
121 (O,R,M) Throttle Position (TP) sensor out of range - TPS
522 (O) Park/Neutral Position (PNP) or Clutch Pedal Position (CPP) circuit fault - PNP
566 (O) transmission 3/4 shift solenoid/circuit - Transmissions
629 (O,M) Torque Converter Clutch circuit fault - Transmissions
So 566 and 629 are for Automatic Transmissions ONLY?
Your profile says Manual trans?
If you do have a manual trans then you will need to pull out the computer and open it up and have a look at the circuit board
Picture of it here:
http://www.auto-diagnostics.info/ford_eec_iv
The 3 blue cylinders are capacitors, these will fail after 20+ years and leak, easy to replace, under $5 in parts
You can usually see leakage
But have a look around for corrosion anywhere on either side of the circuit board
Code 522 wouldn't cause engine issues, more of a nuisance code, but can cause starter motor not to active using the key
The only code that "might" effect engine operation is 121, but wouldn't effect it as you describe, might have sluggish acceleration but would run fine once at speed
In a 1994 4.0l spark is done by a separate module, EDIS-6
Computer controls the fuel system, injectors and fuel mix
Symptom reads like a fuel issue which is why you should check the computer
Just to take it off the table, when did you last get gas?
Easy to get bad gas, too much water in it, takes about 1 day to notice it, hard to get a good running engine with water added, lol