No Linux Distro or version was specified so this answer assumes a relatively new version of SSH.
If the tmux "default" socket is being used on the local host but not on the remote host, tmux should just work by forwarding the unix socket from the remote host:
ssh -R/tmp/tmux-$UID/default:/tmp/tmux-${REMOTE_UID}/default remote
REMOTE_UID
should be set manually to the UID of the remote user but UID
is usually set automatically in the environment.
Ideally, a unique (non-default) tmux socket name should be chosen to avoid conflicts:
local> tmux -L foo
remote> ssh -R/tmp/tmux-$UID/foo:/tmp/tmux-${REMOTE_UID}/foo remote
remote> tmux -L foo send-key C-p
Playing around with TMUX_TMPDIR
environment might give a more transparent and polished experience and work around having to know the UID but that depends on the requirement and might be overkill for just a script.