Could you add a roughly 1.5-second time window between tapping the king and tapping the rook to castle? This would make it so that if the time between the two taps is less than the window, castling will occur, and if it is greater than the window, it will simply select the rook. I'm suggesting this because it has happened to me a lot as well as opponents of mine that we touched the king and then after thinking for a while decided to touch the rook, and that ended up castling when we did not intend to.
If that solution won't work for some reason such as lag adjustments, could you add a drag-and-drop setting such that, when turned on, we can only move via drag and drop and not via tapping? We could turn that setting on and wouldn't have to worry about accidental castling due to an unfortunate sequence of taps. There is already a drag and drop setting on the website (though in my experience it seems you still move pieces by tapping the space??), so that might be an easier solution to implement.
Alternatively, could you make it so that castling only occurs when you touch the king and then the space two spaces over rather than it occurring both in that case and in the case that you touch the king and then the rook?
Whatever solution is easiest to implement as soon as possible would be just fine by me. I'm aware that in order to prevent accidental castling from occurring, we can select another piece after the king and before the rook, but if that were a viable solution to this problem, this problem wouldn't be called accidental castling. It's a common issue in an otherwise superb app, so I hope it can be fixed soon.
Thank you for your time.