This works because my mobile theme uses this header-menu and my main theme doesn’t. Now I can set the mobile menu in my main theme, because d/t this code it is added there to the menu positions settings and passed on to the mobile theme during switching. Hope it’s clear and it helps somebody else.
Just an idea for the plugin – would it be possible to automatically add all menu definitions from selected mobile themes to the default theme menu positions page? Or any other routine which registers the mobile menus with the default theme?