Engine failures due to mechanical issues inside the engine are really rare. According to the info I found somewhere (AOPA, maybe) and quoting from memory, the five top causes of engine failure were, in order as I remember them:
1. Carb ice. Not applicable to injected systems, of course. Carb ice was the biggest, by a wide margin, and speaks of inadequacies in training and understanding of it.
2. Fuel starvation. Either no fuel, or water in the fuel, or the system clogged by some sort of garbage.
3. Ignition hassles. Magnetos need checking every 500 hours or so and many don't get it until they fail. I just read the other day of an accident due to one failed magneto; the distributor rotor bearing (a bushing) had worn to the point that the gears started slipping and the spark started being sent to the wrong cylinders. This caused a huge power loss, as fuel was being ignited when the intake was open or far too early on the compression stroke, and the airplane crashed. Don't students get shown what that Off-Right-Left-Both doodad is for? It's for shutting off a rogue magneto so it doesn't kill you. Why crash with one perfectly good magneto still operating?
4. Oil starvation. Either the pilot neglected to check it and top it up, or there was loss from failed hoses and such. From some of the hoses I've found in airplanes, I'm not surprised. Hoses should get replaced every five years or so; last year I took some hydraulic hoses out of an airplane that were dated May 1957. They were as hard as wood.
5. Internal, catastrophic failure. Very rare. Broken valve stems, maybe, so the engine tries to eat the valve head. Spun main or rod bearings, often caused by starting a really cold engine so that it runs for some time with no lubrication. The oil's too stiff. Stick a quart of oil in your freezer overnight and see how it pours in the morning, and imagine trying to suck it up a tube like the oil pump has to do. Sometimes results in a thrown rod. Then there's detonation damage and a bunch of other rare stuff. Some Lycomings used to have problems with broken oil pump impellers, resulting in some ADs.
You can see that most failures, by far, are caused by ignorance or carelessness, neither of which are the engine's fault. 14% of engine failure accidents (5% of fatal accidents) are due to maintenance errors according to the Nall report.
Dan