Detection and estimation of the cosmic dipole with the einstein telescope and cosmic explorer