Busy-wait is almost the definition of freezing, non-busy wait would be what we'd want. But since Lua is running in the main game thread, even that wouldn't help, even if there was a sleep function, because it would sleep the entire game.
But as was mentioned, send_command('wait x;lua c <addon> [commands]') works as a workaround, though send_command('wait x; lua i <addon> <function> [commands]') may be better, as you can call arbitrary functions with that. For example, if you have defined a function "enter" to do the key press, you can invoke it with "lua i <addon> enter".