It’s unfortunate that you lose keyboard control after this; I take it your only recourse is to hard reset the system? Note that ctrl-alt-bksp has been disabled by default for years in Xorg, so that not working isn’t a surprise.
However, in this case, it doesn’t matter since you don’t seem to actually be in X. Your note about the underscore in the corner is what tells us that, so good detail there.
If you can’t use ssh to see if the system is still responsive, then your best bet is trying to do what @m4k5 suggested, and redirect xorg output. There’s one thing I’d add though.
$ startx >> yourrandomfile 2>&1
so that you record both stdout and stderr. If the system isn’t completely seizing up preventing the flushing of data to disk, then this might leave you a record of what is happening.