You realize you have two basic known problems. You also have known problem you ignored.
You have a known ignition problem. The visible arcing. Start calling around get a new wire. Check, test the coil.
Either cap the vacuum port on the throttle body side or replace the broken vacuum line. Driving with an open vacuum leak is nuts. Ever done a complete tuneup? Cap, rotor, wires, air and fuel filter, pcv, inspect check all vacuum lines?
It's running rough because it's not firing on all eight cylinders, might only be firing five or six. Of course it will run rougher at idle in gear at a stop. In gear at stop the increase load on engine adds to load the the partial power the engine trying to produce. ( I'll chop off a leg , but you gotta climb that mountain like normal) ain't happening..
Don't guess. Fix what's known. Don't touch the egr.
Don't go off on tangent cause it sounds good. You have to repair the known problems.
If you don't have the service manual use the search bar at top " OE service manuals " for the link then download your year, there free, if there is more than one book for your year get all.
Repair what's known and immediate. Then if there are more problems , then cross that bridge.