How do I interact with Mautic from a custom module?
I think you're on the right track. Module https://www.drupal.org/project/mautic_api provides a wrapper around Mautic API - see https://git.drupalcode.org/project/mautic_api/-/blob/8.x-1.x/src/MauticApiService.php#L127
You can use it in you module code via \Drupal::service('mautic_api'). The hook you've mentioned looks correct to me.