I would say get a temp sensor first as its the cheaper option then if its not that i reckon its the distributor. You have done the fuel pump, earths and temp sensor then, so the only thing left will be distributor. Im pretty sure it will be that, i had it happen randomly at first then it slowly got worse and completely gave up. If its not a daily you could wait for this to happen and you will know 100% when it produces no spark.