flaky technically, it can be done, but I don't know of anyone who did this yet. It will require to write a custom Flarum extension. And just like some other extensions that modify URL, it might break compatibility with some extensions, most notably the SEO extension which still has hard-coded URLs in its source code.
While reserving one segment of the URL to show tag(s) doesn't seem too complicated to implement, using a variable number of segments with each tag in their own segment might be more complicated. I'm not sure it can be registered as a single route in Flarum (backend might work, frontend most likely not), so it'll require one route for each possible number of segments.
From a performance standpoint, it will have an impact because each time a link to a discussion is generated, it will have to retrieve the list of tags if they aren't loaded yet. This might result in many SQL queries if the tags relationship hasn't been eager loaded when rendering a list of discussions.
It will also require a number of choices regarding which tag(s) should be included if the discussion has multiple first-level and/or multiple sub-level tags.