Programmatically get webform submissions of a specific nodes webform
Thank you 4k4. Here is now the correct and full code for use in mytheme.theme file (we need the getData() function:

$storage = \Drupal::entityTypeManager()-&gt;getStorage('webform_submission');
$webform_submission = $storage-&gt;loadByProperties([
  'entity_type' =&gt; 'node',
  'entity_id' =&gt; $variables['node']-&gt;id(),
]);
$submission_data = array();
foreach ($webform_submission as $submission) {
  $submission_data[] = $submission-&gt;getData();
}