Thank you everyone for your replies.
Finally I have taken an approach to write Pre and Post operation plugin on merge message of master entity.
On Pre merge operation I have retrieved collection of all related entities and context data. Stored it in a shared variable. And finally used it in post merge operation to revert the changes done by OOB Merge.
And it worked!!