I think a stuck open, intermittent or otherwise, EVAP solenoid valve might enter into this scenario. Stuck Open ( or Partially) valve...gas cap OFF....increased volume of air floods intake...intake continues to receive unmetered air through EVAP in addition to usual TB route....AFR elevated to lean range..ECM compensates with excess fuel, timing changes...hard start. The tendency to start (always, right ?) after a several minute wait points somewhat against a fuel pump/pressure cause. Car starts otherwise fine every time except for popping the gas cap ? Could you check if codes reappear after erasing or stay gone after multiple start ups, running miles without refueling.? AutoZone ,unless you got a friend there, will state they don't erase codes, only read them though.
The solenoid valve on my 09 C300 is, facing the engine, immediately to the left of the wiper fluid reservoir neck, top has circular clear area with centered dot. Sometimes tapping this on the side will unstick it if that is the problem.
Good luck..