osekat,
In a census you can often identify jail, hospitals, reform schools and poor farms, by a notation in the margin. That will give you a snapshot of the place in census years. Massachusetts 1855 & 1865 as well as Feds on the oughts. 1860 is on-line.
Criminal Court records should exist. I don't know of anyone that has sought Jail records, so I don't know if they are out there, I would encourage you to look into them. You may want to see if there is any mention of the jail/house of correction in the city records (a series of books in the Worc. Public Library). They have school committee, public works, etc in them. I doubt they will give inmate names but you might learn who was in charge in the years you are interested in, County vs. city.
When are we talking about? Are you just missing someone for a time? Work might have taken them from the household for a construction season. Please share what you know, or at least post again with an update of your search. John