Electron-phonon coupling induced defect recovery and strain relaxation in Ni and equiatomic NiFe alloy