Missing, stalling 2001 Ford Focus

We have a 2001 Ford Focus with only 23,000 miles. Was running well until it started missing – though not consistently. Thought it may have been bad fuel, but new tank of fuel didn’t change problem. Changed sparkplugs and it was worse – started stalling, jerking. Took out new the new plugs and cleaned old plugs putting them back in. It improved somewhat. Error codes were P0301, P0304 (cylinders 1 & 4 misfiring), and P0402 (which is the EGR). The car seems to idle roughly when cold and after warming up it runs worse and stalls out.