Telephone systems used main distribution frames, but these are unrelated. First, they look nothing like a computer mainframe, being a large rack with cable connections. Second, there isn't a path from the telephony systems to the computer mainframes; if the first mainframes were developed at Bell Labs, for instance, it would be plausible.
As for Colossus, it was built on 90-inch racks, called the J rack, K rack, S rack, C rack, and so forth; see https://www.codesandciphers.org.uk/lorenz/colossus.htm
So it's entirely possible that somebody from the telephone industry decided to borrow a term of art from it for computing.
19 inch racks seem to come from railroad interlocking and may have been introduced by Union Switch and Signal, founded by Westinghouse in 1881, and still around, as a unit of Ansaldo.