As a follow up did any semblance of a judicial system exist to determine if I would be punished? Were trial by ordeals the go-to?
I regret that I can't answer this in detail, as it's both within my flaired subject and my professional expertise (modern criminal justice policy). The medieval perspective just isn't one I can speak to.
But if you're interested in the causes and consequences of modern mass incarceration in the United States, as your question's phrasing suggests, you might want to check out this book, "The Growth of Incarceration in the United States: Exploring Causes and Consequences," edited by Jeremy Travis and Bruce Western, the latter an eminent sociologist. Expensive to buy even in softcover, it's actually free and searchable online, and required reading in the criminal justice advocacy field. John Pfaff's recent book, "Locked In," might answer some of your questions to a lesser extent.
I hope this helps!