contents=1 would delete the entire web part which isn't what you'd want. If the script is making the page unresponsive or generally degrading the experience, then this may be your only recourse.
To fix it though, depends on how the script was implemented. If it is JS embedded into the page, then you need to open the page in SharePoint Designer and then be able to modify the script.
If the JS is stored as a separate JS file and linked in the CEWP, then go to the location where the file is stored and either download and edit it, or edit it in SharePoint Designer.