I just made an account to post my experience with this issue:
I have a rmbp 13 2014 model and it happened in all el cap versions. Everytime i remember it happening there was youtube involved and alot of times clossing the tab.
It caused a systen wide freeze leaving the cursor only moving. To unfreeze the system i would use the keyboad shortcut for force quit which would appear after some seconds, and with great delay i would kill safari and everything would return to normal (almost because a slight system wide slowness was there).
To fix this i would trash all the files suggested in other posts essentially making safari start fresh. And after some time (usually months) it would happen again.
This thing forced me to a clean install after 11.11.4 came hopping to fix it, but today it happened again involving the same factor-youtube.
I also noticed something else, before i went to wipe again safari files i would see that google search page was also acting weird-like slow load-scroll, failing to load stuff etc.
I dont know what else to think! Is it safari's fault, google is serving me bad stuff or my mac has hardware failure!
A few details for my setup: no flash was ever used in this mac, ublock was used everytime this would happen exept after the clean install which i never used ublock and went for adguard, 1password addon was also used lately.
I am thinking that adblockers (and content blockers as it seems) could be a factor and maybe google using **** to bypass them (they are known for crapping safari users before with shaddy tactics).
PS. Last forced quit generated a report for apple, i hope it helps find the cause!