I think this is more complex to achieve in a clean manner than we think.
Since the system is federated, which URLs are considered an instance need to either be hardcoded (if you want only links to those to be intercepted as a URL handler) since the Android permission system only allows these to be defined during compile time;
or you make the app intercepts all https://* websites, basically how a web browser would request permissions to capture all these domains, but then if you tell Connect to always open these links and it's not a Lemmy website, things will start to break down.