See if this helps.
Safari – Popup takes over
Safari – Popup takes over (2)
Popup remover – Scam Zapper
If the pop-up reloads, force quit Safari (command - option/alt - esc) and reopen with the shift key held down. If that doesn't work, disconnect from the Internet, go to Safari/History and delete the website. Quit and reopen with the shift key held down. Then reconnect to the Internet.
Safari -Tech support scam pop-ups
Another option.
Quit Safari.
In Finder go to Go menu and then Go to Folder.
Copy and paste this ~/Library/Safari/Databases.
Delete the contents of the folder.
Launch Safari again and check if all is ok.
If that doesn’t work, copy and paste this ~/Library/Safari/LocalStorage.
Delete the contents of the folder.
Then go to Safari/History and delete any entries for the related websites.
Test.