Working through this logically, and please correct me if I'm wrong:
First it cranked over but wouldn't fire (possibly indicating no fuel or spark, did you check at the time?)
Then it did fire, however wouldn't stable idle (possible air leak)
Stopped firing, fuel and spark confirmed
Flywheel refitted correctly, fuel and spark lost
Is that the correct sequence of events? If so, then it should be something you've done between removing the gearbox to sort the flywheel and replacing it. It cannot be anything else logically, for you to lose both spark and fuel. I don't know if they're on a shared ground at any point, or if there is a cable that's unplugged (or possibly trapped and damaged somewhere?).
Of course, cars are funny things and it could be something completely different, however I would start by unplugging and reconnecting every plug you can see that could be connected to this. That's ECU, cam sensors, injectors, coil packs, the lot. It'll take a while, but it's also pretty easy to do and at least it rules out a bad connection.