Grant permission to current user at runtime in specific environment
Yes you can but why not just remove the field ? here is a few ideas on to how to do it..

in settings.local.php

 //add
$settings['stop_captcha_from_being_stupid'] = TRUE;
// or 
$settings['enviroment_name'] = 'dev';


in some hook_form_alter

use Drupal\Core\Site\Settings; // above ^^^
$stop_capcha = Settings::get('stop_captcha_from_being_stupid') ;
if ($stop_capcha === TRUE) {
  unset($form['captcha']);
}

// or enviroment with custom header ;)
$current_request = $request = \Drupal::request();
if (!empty($current_request-&gt;headers-&gt;get('shutup-captcha'))) {
  if ($current_request-&gt;headers-&gt;get('shutup-captcha') == 'somesalt') {
    $environment_name = Settings::get('enviroment_name') ;
    $environments_to_allow_bypass_captcha = [
      'dev',
      'int',
      'test',
    ];
    if (in_array($environment_name, $environments_to_allow_bypass_captcha)) {
      unset($form['captcha']);
    }
  }
}