Bad starter solenoid. I've had the same problem on two 240s. You can replace just the solenoid but they don't fit quite right, just replace the whole starter.
To verify this, next time it doesn't start, tap the solenoid with a piece of wood or broom handle or something. you can see the starter under the intake mainfold, the little cylinder is the solenoid.