What happens if two contacts are enrolled in the same engagement plan and then get merged? Will the dying contact be removed from the plan? Which state will the surviving contact be in?
Based on Sitecore documentation engagement plan enrollments are not merged. Hence you have to implement any required logic yourself. Be it purging the source contact from all plans before merging or enrolling surviving contact into the same plans that the dying contact was part of. Please refer to Marketing Automation API on how to do it.