Yes. It is safe to unlock Xiaomi devices. But if you frequently factory reset your phone, your Mi phone will be damaged.