An hypothesis: Frazer (and variants) is not especially common in England around 1840. Elizabeth Ferguson Frazer is unigue. Hugh & Mary had 5 children; 2 died late 1837 (disease?); the remaining 3 ended up somehow in Dursley, Gloucestershire, abandoned or orphaned. When old enough they were sent to work - Elizabeth with a local dressmaker and Alexander, like thousands of others from all over England, sent to Manchester to work in the textile mills - he pops up in the 1851 census at Manchester, born Dursley, cotton piercer. Once there the head of household tells the enumerator that Alexander came from Dursley (Alexander, who has had little or no schooling, has no say and, anyway, thinks he was born in Gloucestershire). In 1891 he gets to tell the enumerator his own version - he remembers that when he was a boy he lived at Slymansdale, but didn't really know where it was; all he remembered was being told was that he arrived in a group of orphans or poor children from Gloucestershire.
An engineer could simply be an ordinary bloke driving an engine at a coal mine or a factory or on the railway (a train driver was known as an engineer even in my time).
If I'm wrong, so be it. But it might explain why it is so hard to track down the parents.
Dion