Apple could always keep the record of edits as part of the sender’s and receiver’s iCloud iMessages log, and provide them to law enforcement when a subpoena is presented, similar to Slack with compliance settings enabled.
Presentation layer vs data layer sort of thing.