Infrared outbursts as potential tracers of common envelope events in high-mass X-ray binary formation