Hamiltonian cycle. A cycle that visits every cell of the grid exactly once and returns to its start. It exists on an N x N grid when N is even (go along the top row, weave through columns 1..N-1, come back up column 0). A snake whose head always moves to the next cell of the cycle only ever enters cells its own body has already left.
Expected cost. With the snake at length L, the free cells are the N² - L cells just ahead of the head on the cycle, and the apple is uniform among them, so the expected distance is (N² - L + 1)/2 moves. Summing from L = 3 to N² - 1 gives E[moves] = N²(N² - 3)/4, 976 on an 8 x 8 board. It grows like N4/4.
Safe shortcuts. The body is always a sub-sequence of the cycle. The head may jump to any neighbouring free cell whose cycle position is ahead of it, not beyond the apple and strictly before the tail. That keeps the body in cycle order, so the guarantee survives. A shortcut leaves skipped cells behind the head, though, so late in the game apples may spawn there and cost a full lap: shortcuts help early and hurt late (experiment 3).
BFS and greedy. Breadth-first search finds the shortest free path to the apple. Without a safety rule the snake eventually coils itself into a dead end. The safe variant simulates the move on a copy of the snake and only goes for the apple if the tail is still reachable afterwards; otherwise it chases its tail. Greedy only compares the distance to the apple and walks into traps early.
Simplifications. The snake starts with 3 segments along the cycle; the tail cell counts as free for the next step; no speed-up with length; apples are placed by a seeded generator so a run can be replayed exactly. Time-outs in experiment 2 are not crashes: the strategy was still alive when the move cap ended the game.