I think with retudin's answer we are near the economy minimum. But there's a small improvement possible, to the challenge of finding a minimal diagram+move that can be achieved twice but not thrice.
White to play:
I used Popeye with the option "half-duplex" to find all "h~1" from this position. This asks, with White to move, for all the ways that White then Black can move. There are 24 sequences possible, but in 23 of them, Black must capture. The only exception is
1. 0-0-0 Ke2. Following this the position can be reset with e.g. 2. Kc2 Sf6 3. Re4+ Kf3 4. Rb1 Sg8 5. Ra1 Sf6 6. Kd2 Sg8 7. Ke1 Sf6 8. Rg4+ Se4.
There's a broader question of what are valid n for how many times can a diagram+move be repeated. This is discussed thoroughly in another response, but I agree that the maximum is 22, see: https://chess.stackexchange.com/questions/33707/extended-new-years-math-riddle-5-fold-repetition-75-move-rules/34091#34091.
EDIT: Pulled out from loopy walt's comment, even better!
Again, Popeye proves this is sound.