Custap Berry does not grant priority. It simply makes you move first in the priority bracket the move used resides in. It works similarly to Quick Claw in that respect. You are still using a priority 0 move, and therefore Upper Hand will not trigger.