There is no way to dynamically set validDomains list in app manifest. However you can update the app with new manifest in app catalog section in Teams, so that you don't have to submit it multiple times.
Thanks,
Prasad Das
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link.