Great ok a 1997MY, auto as well?
One of the symptoms of a failing immobiliser is the lack of a spark at the plugs, very intermittent at first but then increasing, engine failing to start but starting after a few minutes, later and onto engine misfiring, and finally cutting out.
Although your "no spark" may be nothing to do with the immobiliser, make up a lead that can be clipped to the + battery terminal and reach the + coil top terminal, so the next time u have the issue remove the white wire from the coil and fit the lead, if your engine starts that proves that this immobiliser circuit is iffy, so no fuel pump, EFI ECU, I assume you can still crank the engine as starter inhibit is the other immobiliser circuit a bit more involved due to the various inhibit relays fitted.
The iffy immobiliser ignition circuit can be fixed by isolating and installing a replacement 12v supply to the coil, if u find that is the problem and nothing else.