How to record a webform submission ID in a CiviCRM field?
there is an extension that allows you to create a CiviRule with trigger webform is submitted: https://github.com/CiviCooP/org.civicoop.civiruleswebform. That might help you, although you probably then still have to create a little CiviRule action that stores the submission ID in the CiviCRM custom field.

Drop me a mail if you want to take this further?