It is not really thread-safe, right.
If you don't need JSR-223 and REPL, then the solution would be to separate compilation and evaluation using new scripting API. Then you can have one compiler - which is heavy, and then evaluate scripts independently in separate threads or coroutines context.