Hi Chris,
I'm having a little trouble parsing your question (specifically, how the workflow ids relate to setting up the frontend to connect to multiple databases).
Currently, the workflows do not have an explicit id. Since a FW can only belong to a single Workflow, you can use *any* of the FireWork ids to identify a Workflow. It doesn't have to be any specific one. Thus the FW ids and the Workflow ids are the same. This has at least some benefit, e.g. once you know a FW id you don't need to do another query to get back the Workflow id, memorize two separate ids, or get confused between whether something was a FW id or a WF id.
So far, I have not seen any need to have an additional workflow id, so perhaps you can clarify a bit more as to why this is useful. In terms of performance, are there real issues you are hitting against? Note that if you index an array field (as we do for the Workflow nodes list), search against that array should be fast.
Btw - just a quick note - I am guessing you have noticed but I pushed major changes to the frontend in v1.1.1, so you should definitely pull those before embarking on more frontend mods.