Theoretical longest legal sequence of moves without thrice-repetition or twice-repeated check back-to-back duplicate absent 50-move rule is... I don't know how long, probably thousands of moves.
The longest known sequence from the endgame tablebases to reach checkmate is in the 500s (look up "longest checkmate". Probably longer ones possible with nine-plus pieces, but diminishingly less beyond 8, as exchanges become necessary. Without the requirement for inducing Checkmate or playing accurately, probably many factors more. Requiring accurate play e.g. avoiding zugzwang surely reduces substantially.
When I say repetition, I mean only TWICE, not 3 times, BUT THE SAME PLAYER HAS TO HAVE THE MOVE, OBVIOUSLY, for a position to be repeated. This accounts for TRIANGULATION and Zugzwang Positions.