Target script (NOTE - Target script), is far more powerful and more intuitive. Also, as you indicate, it doesn't get overwritten.
I can do far more with Target script than what a .lua file can do. Modifiers, delays, sequences and much more and very quickly.
For example: There has been much posted about the difficulty in using the TM Throttle with the AGM65F - having to press a key and the slew at the same time. Many requests to ED to modify it. I had mine working in about three minutes by using Target Script. I just use my slew key and when I release it, it locks on the target. I don't have to use a button plus the slew. Very easy. You can't do that with a .lua file.
You can check it here. #1
I've chosen to use key commands but also I'm now slowly starting to switch over to DX commands.