IMHO a scripting language for something like Factorio should have two things:
Purity
Simplicity
Lua mostly meets the second requirement, but it's lack of purity is what makes it awful for
safety, performance and
flexibility.
It is somewhat ironic that a project like fCPU, uses combinators internally to get performance improvements, combinators are somewhat of a pure / specialized interpreter, this enables the use of SIMD internally, but they're extremely limited in features.
Most interpreted imperative/OO scripting languages like python, lua, and ruby are on the order of 100x slower than C code, or if you have people who can write a JIT compiler like V8:
use stupid amounts of memory
For memory safety you either have to have garbage collection, or a proof system (i.e rust's affine types), a pure language would also help mitigate issues with garbage collection, since we know the life times of said data more reliably, incremental engines also solve the freeze the world issue you get, Unity has this, as well as Haskell.
Based on the way modern Unity games have limited stutter, and even with careful control of GC, and minimal heap allocation for the modding system, I don't think GC is ever an issue for a scripting / modding language.
Statically compiled languages *could* work if Factorio can include the compiler, and only compile the code on mod load, this solves portability issues.
Purity allows effortless parallelism, most scripting languages have terrible threading performance because
closures and mutability demand locks everywhere.
I personally think types are great for safety, but understand why Lua, python etc forgoes them, they can be a pain to deal with, But ADT's are extremely powerful, and reduce the allocation heavy "just use an object for everything", and parametric polymorphism plus type inference (like what Haskell has) can make coding feel similar to dynamic languages.
I personally haven't found a scripting language that ticks all the boxes for me (especially since pure languages are almost non-existent), but there's a collection of languages that get a lot closer than Lua, especially if you're willing to sacrifice some simplicity for safety and performance.
You can see here, how a simple dynamically typed language like Lisp without manual memory allocation can perform on par with C if compiled, or well designed interpreted niche language like Erlang can compete with far less engineering/man hours.
Part of me wishes that people could actually learn something like Haskell, a subset of it could be simple enough to do scripting in it, it's one of the few pure languages around which enables huge amounts of safety, not only can you remove the likes of IO with the type system, but you can do pure multithreading with map, fold and par and not worry about non-determinism, you could use some black magic to get seamless parallelism on event callbacks too.
I've been wanting to make a simple pure functional language for a programmable combinator like fCPU, but Lua makes it rather hard to scale well especially for UPS.