Cpp has very complex and unoptimized syntax by design, so the baseline time to compile is pretty high. Other languages with well thought-out syntaxes (go, zig, odin, even C itself) compile much faster.
I am not entirely sure what your goals are, nor do I know what you mean by “like it was Groovy for Java”, but if C++ compile times are that big of an issue for you, why not just use blueprints as a built-in language? You could do most of your work in the editor without recompiling, their compilation is fast in comparison and in worst case you just write C++ wrappers to expose any functionality you need that’s not already blueprint compatible.
To more directly answer your question, afaik you can link DLLs directly through the build files, so you probably can write your logic in something like C and use that. Or use a library that allows you to execute LUA code through c++ and then you don’t have to compile at all. But at this point you have to deal with the fact that this external code has no notion of the UE’s functionality, so you would have to somehow deal with this.