Could terminal triggers be enhanced with the option to execute only based on other criteria. A couple ideas that come to mind are:
1. Total number of executions (For example, only execute 1 time during a session)
2. Only execute before/after the connection has persisted for X hours/minutes/seconds
3. Execute every x hours/minutes/seconds
this is again a feature we can't add ourselves but which has to be added to iTerm2.
Please file a feature request in their Gitlab issue tracker: https://gitlab.com/gnachman/iterm2/issues