Yes, level ground.
If it was cranking and the starter wasn't dragging, I'm thinking you were either getting no fire or no fuel.
Change your plugs and wires first and see how it does.
Get a can of ether spray start and next time it does this, give it a shot in the intake. If it starts and runs a few seconds, then you have a fuel issue.
Still no start, it’s ignition.
My bet is on the fuel pump. An in tank fuel pump is cooled by the fuel. If you tend to run it down to “E” before filling, the pump will fail sooner. You need a fuel pressure test to confirm if pressure is within spec.
I have seen chafed wires above the crank shaft position sensor cause a intermittent problem like this also. Apparently it lost track of where the engine was and it even seemed like the trans freaked out. First time it happened, I thought I had run over something.