The custom Merge Event object can be used on any object by triggering Apex after delete and in the case of a delete, in a Handler class, check if the MasterRecordId on the deleted record is not null, indicating a merge. If populated, create new MergeEvent__e record populating the ObjectName__c, current time for MergedAt__c, the delted record Id for MergedRecordID__c, and the MasterRecordId from the deleted record for MasterRecordID__c.
Account is provided for example in this project.
MergeEvent__e
Fields:
ObjectName__c: Text(255)
MasterRecordID__c: Text(18)
MergedRecordID__c: Text(18)
MergedAt__c: DateTime
AccountTrigger
AccountMergeEventHandler
AccountMergeEventHandlerTest