Editing/Removing Secondary Menu from Divi

Please note, specific support questions to third party themes are off topic, so I will treat this in a general way, you should be able to implement this with your current theme

To make your code work on only one menu, you need to target that specific menu only. To do that, you will need to check the current menu item location, and if it mathches a given value, then make your changes. The theme lacation is stored as $args['theme_location']

You can try the following: (Just get the correct menu and change accordingly in the code below)

add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args', 999 );
function my_wp_nav_menu_args( $args )
{
    if ( 'MENU LOCATION' == $args['theme_location'] ) {
        if( is_user_logged_in() ) { 
            $args['menu'] = 'logged-in';
        } else {
            $args['menu'] = 'logged-out';
        }
    }
    return $args;
}