Hallo Pat,
You asked : <<Did Germany take census back in the 1840's?>>
They took a people count which if it survives for your area of interest can be found under the title:-
"Gerichtsakten: Court records of an account of hearths, horses, manors, estates, populas, buildings, house taxes, inhabitants, homes, animals, blind and deaf"
The familyhistory film I viewed had official village records going back to 1813. Some village clerks on very early 'census' listed those who had a horse or names of heads of household but other village records just had a note, e.g.: "7 workers". The early court records were submitted annually each July then the format changed so that each head of family was named & his household were numerically noted in various columns, the last column being "Religion". Later on the count date changed to 31st December each year. In the year 1852 most areas listed actual names of all those residing in each household. However, if your ancestor was a worker in 1840's you may be lucky enough to find him listed as working in one of the surrounding villages. I was able to find my 3 x gt.grandfather each year from 1836 but had to refer to church records for his wife & children's names. In families where there were several cousins with the same given names I found it impossible to decide which worker living away from home was my direct bloodline.
I have had the same problem as you trying to find family records. My last known village for my gt.grandfather was Steinlah. Last year I sent the church archives details of the 1852 Salzgitter census where Ehlers grandparents had two 'Flemme' grandchildren in their house. The archives had no record of an Ehlers/Flemme marriage or the baptism of the children in Salzgitter or Gross Mahner. This month the same archives sent me several records, amongst which were details of all my gt.grandfather's siblings including those two 'Flemme' (grand)children but they were recorded as 'Flamme'/Ehlers baptised in the Flachstoeckheim church. The central problem has been not looking in the correct village church records - maybe this is your situation?
Best wishes,
Rena