“Specifically locking someone up in terrible conditions for long periods of time.”
So that leaves what punishments? Execution, flogging, branding?
Pretty much. There were also fines for the wealthy and stocks for the poor.
There had been a long history of people thrown into dungeons and forgotten about by those in authority or just tortured to death.
And no one wanted to keep and take care of prisoners long term. So jail/prison was mostly just where people were kept until they were sentenced.
It wasn’t until the later that the idea of lengthy prison sentence became popular, but even then it wasn’t as much that the sentence itself was the punishment, but an opportunity over time to rehabilitate the criminal. When it was recognized that rehabilitation was usually unsuccessful until the person simply got too old to commit crime, there is your long sentences.
Of course now drug crimes are so rampant that we don’t want to build enough prisons to hold them all, so “prison” sentences are really just creating a designated criminal class walking more or less free as wards of the state.
A typical time behind bars is 1/8th of the actual sentence so a 40 year sentence is 5 years behind bars, but they are credited with time served before the trial. Then for 35 years after they are released they are parolees and can be thrown back in prison on the whim of the justice system without a trial.
They can’t vote in most places, own or handle a gun, travel out of state, or hold a lot of jobs.