A PLC for a single solenoid valve? That seems like killing a fly with a bazooka, no? smile

A few simpler/cheaper options that might work:

A sharper light source (maybe even a laser diode), to focus the light onto a smaller area of the target.

A corrective lens in the optical path (for the same reason)

A "delay on make" time delay relay or a "one-shot" timer between the photocell and the solenoid.

Use 2 photocells spaced an inch or so apart, and a relay that only fires the solenoid when both of them "agree".

If the output of the photocell is DC, a capacitor hung across the output may provide some "damping". Check this with a scope.