If this invariant trips, currently it is impossible to figure out exactly what was the state of the oplog batch on the secondary node without getting the entire oplog and scanning through it. This is problematic from supportability point of view since it requires customers to upload their entire oplog, which could be quite large.
Instead, we should include as much information as possible in the mongodb log before crashing the server to help us diagnose this invariant.