Kevin
Since no one has answered you, I'll give it a shot.
First, the only time a steam locomotive is "perfect" is the day it first comes out of the shop. After that, it starts to break down. Sand, cinders, grit and pounding wear out the bearing surfaces at a steady rate. Pins and bushings in the reverse gear must be kept tight or the engine will be out of "square" or time. Vibration and age cause frame members and other parts to crack or crystalize. Nuts, bolts, adjustment wedges and other componants vibrate loose or even break. A good shop foreman will always watch and listen to the machinery as an engine passes, not for the love of it, but to possibly catch a problem while it is small.
Second the boiler; the heart of the steam locomotive. This is a pressure vessal mounted on a vibrating platform. Think of a balloon that is blown up, the air released and blown up again. Each time the balloon is a little weaker. Failure will occure at the weakest point. In the case of the locomotive boiler this is the tubes, which are the thinest metal in the boiler. The FRA says that the tubes shall be replaced after 1487 service days ( any day in which the steam pressure in the boiler exceeds atmospheric pressure) or 15 years from the date of the instalation of the first tube.
What wears on the boiler? The inpingement of the fire on the boiler sheets, the uneven heating of the metal, chemical corrosion, flying ash and cinders in the firebox, rust, vibration, build up of boiler scale, ect. There are manditory 31 day, 90 day and annual inspections to check for possible problems.
I hope this answered some of your questions.
Tom