‘category__and’ for custom taxonomy?

I think this question can cause a misunderstanding. You say:

I want to retrieve all the posts that have custom taxonomies
‘taxonomy-1’ and ‘taxonomy-2’

but

do you want post that have both taxonomy-1 and taxonomy-2 and taxonomy-3 is irrilevant?

$args = array(
  'post_type' => 'post-type-x',
  'tax_query' => array(
    'relation' => 'AND',
    array(
      'taxonomy' => 'taxonomy-1',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-1', array('fields' => 'ids', 'hide_empty' => false) )
    ),
    array(
      'taxonomy' => 'taxonomy-2',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-2', array('fields' => 'ids', 'hide_empty' => false) )
    )
  )
);

or

Do you want post that have both taxonomy-1 and taxonomy-2 but not taxonomy-3?

$args = array(
  'post_type' => 'post-type-x',
  'tax_query' => array(
    'relation' => 'AND',
    array(
      'taxonomy' => 'taxonomy-1',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-1', array('fields' => 'ids', 'hide_empty' => false) )
    ),
    array(
      'taxonomy' => 'taxonomy-2',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-2', array('fields' => 'ids', 'hide_empty' => false) )
    ),
    array(
      'taxonomy' => 'taxonomy-3',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-3', array('fields' => 'ids', 'hide_empty' => false) ),
      'operator' => 'NOT IN'
    )
  )
);

or

Do you want post that have taxonomy-1 or taxonomy-2 and taxonomy-3 is irrilevant?

$args = array(
  'post_type' => 'post-type-x',
  'tax_query' => array(
    'relation' => 'OR',
    array(
      'taxonomy' => 'taxonomy-1',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-1', array('fields' => 'ids', 'hide_empty' => false) )
    ),
    array(
      'taxonomy' => 'taxonomy-2',
      'field' => 'id',
      'terms' => get_terms( 'taxonomy-2', array('fields' => 'ids', 'hide_empty' => false) )
    )
  )
);

Note that these type of queries will be poor performant, because get_terms run a db query, so using code above you will have several queries that slow down the page view.

If in the file that contains this code you can access to some variables that contain an array of id (or slug) of the taxonomy terms you can use them and improve performance.

Alternative is create a custom db query using $wpdb->get_results with an appropriate SQL query.