With the default Terminal.app, one can select the previous command output with Cmd + Shift + A and then copy it with Cmd + C (source).
Is there a similar shortcut for iTerm2?
I figured out the solution:
Install Shell Integration
Select Output of Last Commandis enabled, and that the shortcut Cmd + Shift + A works as well.