You should be able to do:
tmux send-keys 'exec myscript' 'C-m'
With that, the shell will exec the script (i.e, myscript will replace the shell process instead of getting started as a child). Then, when that process terminates, it'll be the process that tmux ran, so tmux will clean up after it.
An alternative is to have a reasonably big history and install the tmux logging plugin
I like to have logging in all tmux windows turned on by default. I log to a 'tmux_log' directory and have a cron job to delete very old logs.