If you use a persistent engine, you can load all your functions once per session, and it will be available in memory to all scripts running in the same engine.
what do I have to do to run a "persistent engine"?
➤ If the script originates outside the application, and the named engine does not exist, the directive is ignored.
I just reminded myself this is the server forum.
To create a new session e.g. for InDesign desktop / ESTK to try things out, use a startup script.
You should also thoroughly test your scripts against leaks - some constructions are not caught by the garbage collector.
As preparation install your script and do a test run.
Then invoke the garbage collection yourself. Do it twice, it really makes a difference.
Repeat the exercise a couple of times, and see whether there are changes in the summary.
Dependent on the amount, you better track them down or plan to restart the server every now and then.