I need to perform the function of this (InDesign script to replace all fonts in a document) script across all open documents or all documents in a book. Can this be done?
yes, you can loop through all open documents through scripting. Below is an example of this. https://community.adobe.com/t5/indesign/change-scripts-to-run-through-multiple-documents-in-a-book-rather-than-just-the-open-document/td-p/5702124
But considering that with the "find/replace font" tool a change in one document takes about 5 seconds you would need at least 200 documents that it is more time efficient to write a script for this in my opinion.