Can’t quite follow your post - which domain did you delete?
If the free subdomain is active on your account, just add the custom domain as a parked domain (this should work, I could be wrong. Been awhile since I’ve tried this)
If it’s not, add the free subdomain, then the custom domain as a parked domain. Then move your files from /htdocs to /<free_subdomain>/htdocs.