I just managed to strip this problem from a friend’s website. I found a large chunk of php at the very bottom of the theme’s footer.php which was doing all the heavy lifting and re-installing the js.php files, and others, after deletion. No hint as to how that code got there in the first place, however.