That's a shame. I was hoping for a place name on the 1851 census.
Presumably you have checked Scotland's People? I entered a rough date range of 1798 to 1807, and there are 133 matches over 6 pages of results. If he was born "about 1804" and this was accurate, of course the date range and results would be substantially reduced. Searching 1802-1806 gives 71 matches over three pages, so reasonable to pay credits to view three pages. Of course the problem is knowing which, if any, is your William.
Without some clue as to his origins from his marriage or death I can't think how you will progress with this. Have you checked for local newspaper reports of his accident which may say where he was from? I would imagine this would have been a newsworthy event in Douglas.
Do you know if he followed the Scottish naming pattern for his children?
I hope others have some better suggestions for you.