Sure, you could do that. You’d just need first get all the child categories, organize them into an array of id’s, then pass that to your query.
You could use get_categories and use its child_of
parameter (passing the parent category’s id to there).
After that, there are several ways to get just the id’s into an array. You might try looping the categories array and creating a new array from just the ids like this:
$categories = get_categories( $your_args_here );
$exclude_these = array();
foreach ( $categories as $category ) {
$exclude_these[] = $category->cat_ID;
}
// at this point, $exclude_these is a proper array of
// child categories that can be passed to your query