Such a script can determine the size of each page (a bit tricky, as there are multiple page boxes), and then use the formula you developed to calculate the desired font size, and then add the header text.
If you have Acrobat Pro it can even be used to process multiple files in a single go, as long as the number is relatively small (up to 500 at a time)...
Thank you for confirming my belief that it's possible!
try67, would you happen to know what sort of terms I can search for to learn about how to go about this? I'm going to sit down tomorrow and give it a go. Thank again.