only writes it once to file hist5 ? Furthermore, I can hear the hard drive working on the 2nd command until I end the process, but the history | head -5 is only written once.
It does not write once. It writes continously without break the same 5 lines into hist5 file over and over and generates considerable load at your machine. Since every session has its own history this makes no sense to do.
I'm unsure, but I assume .bash_history file is written at logout. If you want to see another sessions history with this, this will not work.