That's true, but in this case we are only sending the function name as a string back to the engine. As long as the lua function is defined before the physics update all will be good because when the function should be fired from the engine, you can do that with the string of the function name.
If doing it from C++ an example would be:
/* the function name */
lua_getglobal(L, "add");
/* the first argument */
lua_pushnumber(L, x);
/* the second argument */
lua_pushnumber(L, y);
/* call the function with 2
arguments, return 1 result */
lua_call(L, 2, 1);
Notice how the string "add" is the lua function name.
So if we were able to define our own lua functions per body, I assume you could use the exact same code you do for C function pointers but instead you are just storing strings of the lua function names instead of C function pointers.