Hershey has had a strong 2022, and that momentum could be carried into the new year, according to UBS.