There have been some Threads about batteries not too long ago, a search may throw up some ideas for you, perhaps another search may help with the actual problem.
Just a thought for you to try. When this happens again put the headlights on and try again, if the lights dim dramatically with no engine turn it will indicate a current drain from the starter OR a poor connection somewhere which can't cope with the demanded current.
Certainly the first port of call for me would be the battery and starter motor connections. If you have a DMM with a Min Hold function or if not someone to help you you could also see what the battery volts are during these episodes, it shouldn't drop by a huge amount even under the heaviest load conditions, worst I've seen and still working was about 10.5 volts and it was really struggling to turn over, this turned out to be the Starter motor with some shorted turns..........
Of course if the lights don't dim then nothing is trying to happen, poor connection or O/C Starter motor. I think, though NOT SURE, that the immobilizer would not cause this, it allows the engine to turn on the starter but if other conditions are not met will not allow it to fire.
Hope you can sort it out, a car that wont go is as much use as a chocolate teapot and bluidy INFURIATING.
Cheers, if I'm teaching you to suck eggs just ignore me.