Oil light on then off then CAR DIES

We did buy the car new. Changed the oil regularly every 3,000 to 5,000 miles. Just changed all the belts and water pump a few months ago. Is there anything else that could cause the oil pump to fail other than sludge build up? Electrical issues maybe?