How can I load webform content inside a custom webform composite element?
Finally I used the good old session.

My solution:

//mymodule.module
function mymodule_form_alter(array &amp;$form, FormStateInterface $form_state, $form_id) {
    $session = \Drupal::request()-&gt;getSession();
    $session-&gt;set('value_from_earlier_step', $form_state-&gt;get('value_from_earlier_step'));
}

//\src\Element\ExampleComposite.php
class ExampleComposite extends WebformCompositeBase {
    public static function getCompositeElements(array $element) {
        $session = \Drupal::request()-&gt;getSession();
        $expectations = $session-&gt;get('value_from_earlier_step');
    }
}