In reply to Sharp:
Good luck with this, it could be something caused by a trivial thing (like the core plugs) or something no computer/code reader could ever pin point. Any half decent spanner monkey can inteript fault codes (which is much harder than it sounds) and replace parts but you need someone with a full understanding of electronics to get to the bottom of a problem like this and even then it could be hit an miss. An example is to look at a common fault on Nissan Primerias - when the temp drops to near freezing the dash display screen goes off. This is a problem as the sat nav, radio, heater controls etc are all run using this screen. Nissan never did find the cause of the problem nor did any independant, The fault was found by pure chance by someone with a donor car to swap parts in and out of. Logically the first thing to try was the actual screen, everyone else had already tried (and charged the customers for) a new screen but no joy - the problem returned when the temp dropped. The problem turned out to be in the actual radio unit itself. The power supply board that dropped 12v to 5v in the radio was made by a 3rd party electronics comp in tiwan and it turned out they had used inferior manufacturing methods. A white glue was used to cover the electronics on the board and to reduce the buzzing noise coming from a coil, age affected this glue and when very cold it shinks and pulls a transistor off the board. Temp increases again the glue expands and presses the transistors poorly soldered legs back on the board. Thats all the problem ever was, it was chance it was found after a home mechanic found the fault to be in the actual radio and then others took it further. I had a brisk trade in reconned radio units myself once the nature of the problem was found. Nissan offered no recall or replacement program and denied all responsibility saying if out of warranty then hard luck. Interestingly though, Nissan has started to replace the radio units now when this fault appears rather than the screens/ECU as they did before. Nothing to do with your problem focus I know but its a tale that shows how some faults can be extremely hard to find and paying an auto electrician £50 an hour to find the fault can quickly lead to it being unecconomical to pursue.
If I had time and the money to sort this I'd buy exactly the same car as you have now and over time, swap over every part of the ignition/electronic system until the problem is resolved. It may be a fault in the actual wiring loom or earthing point so even parts swapping won't cure the fault.
I hope its something simple but TBH, a 13 year old 170k focus is IMO reaching the end of its ecconomical life.