Here's my go. The final key idea is lifted from loopy walt's solution, but the rest of the setup feels different enough to warrant posting separately:
White to play:
Here, the first time around, white can castle, which is the only non-checkmate move that avoids both a stalemate and a capture. To get back to the same position later, white can bring a rook to e4, which makes the king position safe again, so white has time to get all their ducks in a row while black wiggles the knight around elsewhere.
White will then play the discovered check by moving the rook from e4 to e8, and after the black knight blocks, the same situation is reached again. This time castling is not allowed anymore, so either a checkmate, a stalemate, or a capture (Qg2+ Kxg2) is unavoidable.
For double checking purposes, here's a sample game that reaches the position after moves 28 and 38, and then never again:
1. e4 d5 2. exd5 Qxd5 3. Qh5 Qxa2 4. Qxh7 Qxb1 5. Qxh8 Qxb2 6. Qxg8 Qxc2 7. Qxf7+ Kd7 8. Qxf8 Ke6 9. Qxe7+ Kf5 10. Qxc7 Nc6 11. Qxb7 Ne5 12. Bb2 Qxb2 13. Qxc8+ Kf4 14. Nf3 g5 15. g3+ Kxf3 16. Qxa8+ Kg4 17. Qxa7 Qb6 18. Bc4 Qh6 19. Bd5 Qxh2 20. Rxh2 Nc4 21. Rh8 Nxd2 22. Re8 Nc4 23. Re4+ Kf3 24. Ba8 g4 25. Qh7 Nd6 26. Qh2 Nf7 27. Qg1 Ng5 28. Re8+ Ne4 29. O-O-O Ke2 30. Bb7 Kf3 31. Ba6 Nf6 32. Re4 Nh5 33. Bb7 Nf6 34. Kd2 Nh5 35. Ke1 Nf6 36. Ra1 Nh5 37. Ba8 Nf6 38. Re8+ Ne4
EDIT: In the comments below, @Retudin proposes an outrageously beautiful modification that not only does away with an unnecessary pawn, but two of them!