The 1st challenge is to get a list of extensions and names from multiple 3CX servers. You do not want to have to maintain a central database of extensions manually. They will always be out of sync unless you have a carefully followed procedure

for adding / deleting / editing extensions.
The 2nd challenge is that you will have to build a complete replacement for the company directory using the CFD. That's not a trivial effort, but absolutely is possible.
The 3rd challenge is whether your CFD will forward the original caller ID when the call is transferred. I don't know the answer to that, but it would be easy to test.
Years ago I built a "Unified Directory" of extensions across multiple 3CX servers. It worked great as a web page (rather than a CFD), but many of the challenges are the same. As I recall, I found in the provisioning folder an XML file containing all the extensions. I don't know if that file still exists. You could also get a list of extensions using the Call Control API.
Frankly, I'm regularly tempted to build a replacement for the company directory. Your scenario would be my primary motivator, but wouldn't it be cool if you could search the directory by location, department, first or last name, and what they heck, how about voice recognition too. It is all possible if you want to invest the time. Maybe a touch-screen version too for a company lobby too. Man, if only I had the time to pursue all the ideas requested in the forums...