Instance sharing with adjusted profile path

Since the “encrypted” notes feature currently isn’t seeing much progress, I figured a way to spawn a Joplin instance with a custom database path (~/.config/joplin-desktop etc.) would be a good solution.

To that end I found this thread, and that works perfectly – however unfortunately Joplin just focuses the running instance when I start a different one with a custom profile path. Would it be possible to only focus an existing instance with a matching profile path instead and otherwise spawn a new one?