Perhaps it comes from when cheques were machine printed in banks. Rather than stubs as we have now, cheques had a couple of carbon copies and those holes were literally cut with a series of holes that went right through the cheque and the carbon copies as an anti forging measure.
Yes, perforated-numeral machines were used starting in the 1870s even for single-copy checks. It served both purposes: anti-forgery and creating multiple paper records of the transaction. In the early 20th century this gave way to maceration printing which the printer both impregnated ink deep into the paper but also macerated the paper in the shape of the numeral. If you tried to alter the numeral, the greatly-weakened paper would disintegrate. In a related technique, there were checks where the denomination was indicated not by writing in numerals, which could be bleached and rewritten, but by punching the desired numeral in a set of columns. A check with more than one numeral punched per column -- or with blank columns -- were deemed invalid. I'd say any of these techniques stands a chance of being the origin of the phrase.
Even for printed checks, perforation methods were often used to cancel it -- i.e., mark it as Paid well into the middle of the 20th century.