Get Text Domain For Transalation

No, there isn’t. The text domain needs to be hard coded, otherwise it can’t be read by localization tools which parse the code without executing it.

See this note from the Internationalization documentation

The text domain should be passed as a string to the localization
functions instead of a variable. It allows parsing tools to
differentiate between text domains. Example of what not to do:

__( 'Translate me.' , $text_domain );

The string itself also cannot be a variable or function for the same reason.