This issue is resolved in ePO 5.1.3 and ePO 5.3.1. So, when the LDAP sync task encounters an exception, user data isn't deleted.
This issue is also resolved in Hotfix EPO5xHF1048264 for ePO 5.1.0, ePO 5.1.1, ePO 5.1.2, and ePO 5.3.0. The issue documented in this Knowledge Base article is addressed in ePO 5.1.2 and ePO 5.3.0, which are also both available for download; but, EPO5xHF1048264 contains fixes for two additional issues that aren't addressed in ePO 5.1.2 or ePO 5.3.0. For this reason, we recommend that all customers who use DE apply the hotfix. Please see the hotfix release notes (PD25978) for a full list of resolved issues.
Also, if you have ePO 5.1.0 or ePO 5.1.1 with EPO5xHF1048264 applied and you upgrade to ePO 5.1.2 or ePO 5.3.0, you must reapply the hotfix as the upgrade process removes it.
NOTE: The fix prevents the ePO server from entering the error state, but doesn't correct the problem if the ePO server is already in an error state. Use one of the workarounds below to correct the error condition.