For this purpose I set very large history in tmux and I almost never use terminal outside tmux anyway. The panes and windows in my tmux are very long-lived, but when I decide to close one I need to go through it's history and manually extract interesting/important bits. It's annoying and automating this would be really nice though.