Why is the token in my custom module not replaced?
Translatable strings don't use tokens, but placeholders, see for example https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Render%21FormattableMarkup.php/function/FormattableMarkup%3A%3AplaceholderFormat/8 for some documentation, or https://www.drupal.org/node/322729 (more 7.x, but conceptually still mostly OK).

Tokens are when you have user configurable text like the user register/confirmation mails. It doesn't make sense to have token in a text that is hardcoded since tokens are only useful if that text can be customized by the user. For documentation on how to use the token API, see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Utility%21Token.php/class/Token/8