"Daemon mode" is the mode for tmux, and the whole stack is designed to be extremely scriptable. "tmux send-keys" does what you're referring to, here, but essentially anything you can do interactively, you can do via the command-line.
Not to say you shouldn't just keep doing what works for you! But figured I'd at least make mention of tmux as an alternative... I'm a fan. :)