Hide menu theme location for certain capabilities?

Check user capabilities or roles when registering the navigation menu. The data will remain accessible via wp_nav_menu, but users without the capabilities won’t see the location in Appearance -> Menu -> Manage locations.

Note this will only prevent assigning menus to these locations. Any menu assigned to the location already will be manageable (if the user has the capability). To resolve this you can access the filter “wp_get_nav_menus” to strip menu items from the select menu drop down.