There's a ton written on tmux as you can imagine by this point. This page seems pretty comprehensive on the advanced features including tmux scripting:
You mentioned your editor on the remote server. Does everyone have their own account with their own settings on all remote servers? We're still at a point where everyone accesses servers via the one shared "root-ish" user.
I always run tmux locally. If you want to connect from a different computer, just ssh in and then "tmux attach".
For what you are describing the best practice is a nested tmux session with tmux running locally and on the remote server. So you would open tmux locally, then in one of the windows or panes you ssh into your machine, then open tmux on that machine. This will require you to press the tmux prefix (ctrl+b or however you've set it) twice to do the commands on the remote tmux instance. However you can get around this with some configuration (1).
1. https://www.freecodecamp.org/news/tmux-in-practice-local-and...
I think certain certain terminal emulaters like iterm2 have tmux specific features that could also be helpful, but I don't use that software so I am not as familiar.