Doc
My wife works in a state prisons and I was amazed at what is involved with running one particularly before 1960. They were cities on to themselves. They grew their own food, made all their clothing, and generated their own electricity and heat. Many of them treated their drinking water. Many of the raw materials that they needed were brought in by rail. Also many of their surplus products were sold on the outside or given to other prisons.
The prison my wife works at had a small yard and was accesses off a lightly used branch line. They would receive several coal drags a month for their power plant. Tank cars for the water treatment plant, lumber for the wood shop, leather and other materials need by their shoe factory. Also there was grain and feed for the livestock and other items that they required. When the prison shut down the power plant, got rid of their livestock, and began using trucks the branch line lost its reason for being and was abandoned. The right-of-way for the branch line is still there today, now it is a bike trail. The right-of-way for the yard and siding into the prison is still visible today. Also a large bridge across the creek remains in place.
A prison would be a great addition to a layout because of all the opportunities for loads in and out.
Of course my rambling doesn’t answer your challenge.