"Rosie, you have it. Two sons called Charles born about 10 years apart.
So Charles Hanley and John in 1851 are from another family altogether (or families).
Charles and Ann Hankey appear on FamilySearch as Markey in 1851"
Yes that makes sense now.
So - I think I can tentatively say the two boys in the 1851 census in the workhouse school match the Charles in 1881 census. The other families are not likely connected.
the 1881 census is the key one for me because it shows the presence of a man I believe to be the father of my husband's illegitimate great grandpa living in close proximity to the mother.