Early warning of precessing compact binary merger with third-generation gravitational-wave detectors