ez can be used as a document managment system (if you think you performance is critical, do some benchmark).
You don't need to hook into external databases for that.
However, that's quite easy to create a custom attribute that takes its datas from an external table. Some of the countries extensions do it like that.
I've integrated ez with external CRM without problems. On the contribs, have a look at the phplist extension. What Bruce has done with phplist is probably quite close to what you want to do.