The first question I have is do you have URL patterns that would allow you to distinguish client id and tenant id from your folder structure..
Your example is:
https://experienceleaguecommunities.adobe.com/t5/[clientid/[tenantId]
might you also have
https://experienceleaguecommunities.adobe.com/t5/something/[clientid/[tenantId]
or
https://experienceleaguecommunities.adobe.com/t5/something/somethingelse/[clientid/[tenantId]
URLs?
even if client id and tenant id are at the end of the url in that order, how do you distinguish urls that don't have them?
https://experienceleaguecommunities.adobe.com/t5/something/somethingelse
(you don't want to treat "something" like a client id, and "somethingesle" like a tenant id)
It's absolutely possible with a little script to parse URLs and to extract and pass values to Analytics, the trick is how do you parse them reliably....
If maybe there was a specific path structure like /cid/[clientid]/tid/[tenant id] or /cid-[clientid]/tid-[tenantid] that you could use to properly match the pattern against with a regex, that would be a better implementation....
It won't be out-of-the-box like Query String Parameters (?clientid=[clientid]&tenantid=[tenantid]) - there are specific launch rules for getting the value of any query string parameter:

But you can absolutely use JS to parse the URL and extract portions using regex or other string manipulators......
But here is the next question.. do you want all URL variants being recorded (in Adobe and any other analytics tools) to track every client / tenant variant as a unique URL value (this could also potentially have SEO impacts, even with having canonical URLs pointing to the URL without those value - Google reserves the right to ignore your canonical declaration if it feels like something else would be better).
You can of course override the g (page url) param with a canonical value using Launch.. you don't have as much control with other tools (so if you have a backup GA implementation, or FB Pixels, etc.. they will record the URL as seen - most of these can be configured to ignore query string parameters, but not to ignore what looks like actual folder structure....)