When programming UR e-series from the pendant, there is a convenient command option for the
move command, that adds “until tool contact” condition. Is there a corresponding counterpart in UR Script, or should one implement it oneself similarly as is done on page 63 of the manual - section 14.1.49 tool_contact_examples?
no, there is no direct correspondent Script function available.
To get an insight in the script equivalent, you can program the functionality in Polyscope and save the Program. Then take a look at the generated script code, which you can use as a basis for your approach.
Often do Poylscope Features require quite a bit of Script code in the background to contain all the needed functionality. The Manual you have linked is the correct place to go in cases like yours.