I've been making a "browser switcher" which you can set as the default browser and you can pick which browser to open links in (using a UI similar to the alt-tab UI). I currently have it working with Chrome profiles, but I suspect Firefox profiles wouldn't be too hard (so long as you can open a link in a specific profile from the command line).
That sounds awesome. Can you share your repo, if it's public?
The current version isn't really ready for public consumption right now I'm afraid (the current version has my favourite Chrome profiles hard coded, and some weird debug logging to a hard coded file location). But I have been meaning to clean up and release it. So perhaps I'll get around to that soon.
Great idea! I was thinking about something similar too. Having multiple browsers doesn't have to suck...and having to fiddle with galternatives or KDE systemsettings isn't ideal.

May I suggest you to add a small (and optional!) config file to automate your UI - like e.g.:

    [Sources]
    Telegram=chrome profile B
    Discord=epiphany

    [Destinations]
    https://www.google.com=firefox profile A
If the config is there, you'd then only show the UI when neither sources nor destinations match (regexes). This would make it a must have tool IMHO :)
Yes, I'd love to do that. There is in fact already an app that does this on macOs (https://github.com/johnste/finicky). And you can chain them so that finicky runs first and then calls a chooser UI "browser" as a fallback. But I would like to incorporate it into my app so that I don't have to run two apps (and so that I can make it work cross-platform).