It is totally safe to use Admin Key inside Custom code as there is no way that your code/keys can be seen from the outside world. Custom Code wraps your code inside jar file and uses it for fulfilling the request at run time. Your code remains on the server and no one can get access of your jar file until you yourself distribute URL of your jar file to the outer world.
For giving the permission on doc, you have to first give the access on doc using grantAccessMethod or setting up the default ACL as PUBLIC READ. While you are calling findAllDocuments, it will just check the permission and give you back the target documents. Before calling this method you have to make sure that you have permission on all the docs. In your case, if you are using Admin Key to call this method, it will return all the docs as Admin has full privileges on all the data.
Let us know if it answers your question.