Assume the goal is that a certain side castles as soon as possible, and the other side wants to completely ruin castling rights.
White simply plays 1.e3 2.Nf3 3.B any 4.(5.)capture an interloper 5.(6.)O-O. Black can at most play a stinker to (Q)d2, g5, h2, h4, f3, (N)e3, g3, d3, c2, f3...everything is well protected - and especially N-f6-g4-xf2, the only route that is not, does not interfere! The most clever idea might be 1...d6 2...Bh3 but then Bb5+ comes with tempo...Thus a line like 1.Nf3 e5 2.e3 Qh4 3.Nxh4 Bb4 4.Be2 Bxd2+ 5.Bxd2 e4 6.O-O or similar seems to show White can always castle in move 6 latest.
For fun I tried this chess variant with our kiddies (when they "forgot" to castle in their games again). Jury is still out, but I'm fairly sure at least White can permanently put a cork to long castling by Qa4 and Qxa7, if necessary exchanging defenders Nc6 and Bc5.
It will be hard to give a definite "castle!" or "no castle!" verdict but in principle a problem chess program is able to check "castling in n" as stipulation. (The time needed will be looooong, though...)
Addendum: Popeye/Olive affirms that with the somewhat unintuitive 1.Nh3! 2.g3! (believe or not, 1.g4! also works), White can always castle in 5 moves. (On Nf6/Nh6, of course 2.e3/e4! must follow.) Conversely, at least 1.e4 only delays Black's short castling but can't hinder it (move 7) after only 1...Nh6! (6 minutes solving time).