Lua itself is synchronous, but the server around it is not. Before any Lua code is executed, a plugin-specific mutex is acquired. All the API calls that the plugin makes are then executed with that mutex locked. This is the core of the problem - one thread acquires this mutex and calls the Remove API, and in between those two, the world tick thread tries to call the hook. The world tick thread is waiting to acquire the mutex, while the first thread is busy removing the hook. This is the situation that needs to be taken extreme care of.
If you're willing to put some effort into coding the server, may I recommend picking a different task? There are quite a few plugin requests, some of them really relevant and useful, such as the Grief Prevention plugin ( https://forum.cuberite.org/showthread.php?tid=1671 ). Or if you want to code something in C++ instead, how about fixing the crash that occurs when a task is scheduled by a plugin and the plugin is unloaded before the task runs ( https://github.com/mc-server/MCServer/issues/1556 ). These would be, in my personally biased opinion, much more useful
If you're willing to put some effort into coding the server, may I recommend picking a different task? There are quite a few plugin requests, some of them really relevant and useful, such as the Grief Prevention plugin ( https://forum.cuberite.org/showthread.php?tid=1671 ). Or if you want to code something in C++ instead, how about fixing the crash that occurs when a task is scheduled by a plugin and the plugin is unloaded before the task runs ( https://github.com/mc-server/MCServer/issues/1556 ). These would be, in my personally biased opinion, much more useful