How to control which parent menu items are shown?

I’d probably use a nested structure field to fully control the menu manually (with pages fields inside the structure)

      fields:
        type: fields
        headline: Menu
        fields:
          menu:
            type: structure
            fields:
              mainitem:
                label: Main Menu Item
                type: pages
                query: site.index # you can adapt this query to exclude pages that shouldn't appear in the main menu, like the error page or subpages etc.
              level2:
                type: structure
                fields:
                  subitem:
                    label: Child Menu Item
                    type: pages

The toggle field approach works fine if you just want to include/exclude pages from the navigation. But if you want to control the level where in the navigation an item appears, or the order in which the items appear in the navigation manually, the toggle field approach is not enough.