So to break this down -
https://pubmed.ncbi.nlm.nih.gov/6289234/
"Herpesviruses isolated from patients with oral lesions were found to survive for as long as two hours on skin"
That's from oral lesions, the virus was isolated from the lesion - in controlled studies - and they studied it in controlled settings.
Also, "as long as". It doesn't mean it will last for 2 hours.
Once any virus is exposed to air, it will begin to degrade. Think of when we first started with covid, and it was recommended that we let mail sit for 2 days, and we wipe our groceries, etc., etc. Then we found out more and more about it, and realized that we didn't need to do that because it was airborne and the virus degrades enough on surfaces to not transmit that way.
So when you give a handjob, a few things matter - first, the skin on your hands is too thick for the virus to infect. If there is virus on your hand, after the movement, the exposure to air, time, touching other things, etc., it degrades enough that it is unable to infect anything.
Effectively, it dies and is unable to infect.
If you touch an outbreak, don't touch your eyes or mouth or nose immediately after. That's all you need to worry about.