welcome, I hope you enjoy your stay.
I have an advice in my config to make M-! and M-& write the command before the output so that I can easily rerun the command with another keybinding (which just runs the current line as a shell command (well shell-command+ command)). I haven't bothered proposing this as a patch since it seemed too personal, do you think such a thing will be helpful for you too? If so, I will prepare a patch accordingly I suppose.