Salesforce Platform Events trigger ends abruptly when it hits Uncaught exceptions like Governor limits.
EventBus.TriggerContext.currentContext().setResumeCheckpoint(replayId) can be used to resume the Platform Event trigger from the failed replayId.
replayId passed will be used to resume the Salesforce Platform Event trigger from the failed replayId due to Uncaught Exceptions.
The default batch size is 2000. To avoid hitting the uncaught exceptions, lower the batch size.