IMHE 'nothing you have a spare part for ever breaks'.
Similarly, the time to start searching for a used engine is when yours is still running well. When you think you do not need something, it seems there are bargains everywhere. A well oiled spare engine (especially if you have all the accessories like starter and alternator and coilpacs) in the corner of your garage will just about guarantee that the one in your car will run forever. When you sell the car you can always find someone who needs your spare engine.
Having spares like coilpacs make problem diagnosis easier as you can just swap components. When I got an error code, the Saturn dealer diagnosed faulty coilpacs and wanted several hundred dollars for nonreturnable replacements. I was able to install the questionable coilpacs on another engine where they operated fine and was able to trace the problem to a $5 faulty plug wire. I was able to find a spare coilpac at a self serve wrecker for $6 which will probably mean that none of mine will ever fail.
The local self serve wrecker has half price days every couple of months and a complete motor is ~$150 (90 day guarantee). Last time I was there two guys took an engine and transmission out in the morning and said they would be racing (auto-fwd-4cyl-claimer class) with it that evening.
YMMV