How to get an array of pages ID by some page’s slug and all its children pages in get_posts() function?

You can use get_page_by_path() to get a Page’s WP_Post object using its slug (ie, its path), and then use that object to then get the array of child page IDs using get_children().

// First we'll create the list of posts (pages) to exclude.
$exclude = array();
$parent_page_obj = get_page_by_path( 'abc' );
if ( ! empty( $parent_page_obj ) ) {
    $parent_id = $parent_page_obj->ID;
    // Adds the parent page to the $exclude array.
    $exclude[] = $parent_id;
    $args = array(
        'post_type'   => 'page',
        'post_parent' => $parent_id,
        'numberposts' => -1,
    );
    $children = get_children( $args );
    foreach ( $children as $child ) {
        $exclude[] = $child->ID;
    }
}

// Now you can use the $exclude array in your get_posts() call.
$get_posts_arg = array(
    // All your existing arguments here.
    //...
    'exclude' => $exclude,
);
$my_posts = get_posts( $get_post_args );

Get all children and grandchildren, yea, unto the nth generation

The code below uses recursion to get the children of the children, until you run out of children. I’ve tested it quickly in a local WP installation, and it worked to a depth of 5 generations.

It should work for what you’re doing, but be aware that recursion can lead to infinite loops, so please test it in a non-production site before you put it into production.

/**
 * Gets all the descendants of a give page slug.
 *
 * @param  int|string $id   The ID or slug of the topmost page.
 * @param  array      $kids The array of kids already discovered. Optional.
 * @return array            The array of kids found in the current pass.
 */
function wpse365429_get_kids( $id, $kids = null ) {
    if ( empty( $kids ) ) {
        $kids = array();
    }
    if ( is_string( $id ) ) {
        $obj = get_page_by_path( $id );
        if ( ! empty( $obj ) ) {
            $id = $obj->ID;
        }
    }
    if ( ! in_array( $id, $kids ) ) {
        $kids[] = $id;
    }
    $child_pages = get_children( $id );
    if ( ! empty( $child_pages ) ) {
        foreach ( $child_pages as $child ) {
            $kids = wpse365429_get_kids( $child->ID, $kids );
        }
    }

    return $kids;
}
$exclude = wpse365429_get_kids( 'abc' );
// From this point, you can use the $exclude array as you did in the
// previous code snippet.