UPS stock has taken a beating this year. But artificial intelligence could be the key to getting margins back on track.