How to add a custom variable that can be accessed on bootstrap's menu--account.html.twig?
I have done this for a theme on past projects. Be sure to pass it in through the content item:

Example

use Drupal\Core\Render\Markup;

function mytheme_theme_registry_alter(&amp;$theme_registry) { 
  $theme_registry['menu__account']['variables']['nickname'] = 'default'; 
}

function mytheme_preprocess_menu__account(&amp;$variables) {
  // code...

  $variables['content']['#nickname'] = [
    .. renderable properties
  ];

  // or also...

  $variables['content']['#nickname'] = Markup::create('Jeff');
}


Then, in the twig template:

{{ custom_var }}