Would it be possible to precompute all valid sequence start indices?
If so, you could store the list of all files and the file_id with start_index in your Dataset.
Then in the __getitem__ you could use the index to get the current file_id with its corresponding start_index to load the file and the sequence.
Would that work for you?