I love idioms. They often have very wonderful beginnings that we are not aware of.
The idiom “Cut down to size” is exactly one of those idioms.
And it refers to the length of a rapier. Or more accurately a rapier that is too long!
In 16th and 17th century London rapiers were very popular. And men would wear them on the streets. But they got to the point where they were getting too long and they were a danger to passers by and visitors.
So, when entering London, men wielding swords would either have to turn them in or have them “cut down to size”.