I've done a ton of research on this, and "main frame" in the computer sense originated with the IBM 701, which was built from various frames such as the power frame, the storage frame, and the main frame (which performed computation). There is a direct (but complicated) path from this to the modern meaning of "mainframe". The "main distribution frame" in a telephone exchange was unrelated.
Indeed. A "main frame" was originally the housing used for the relay switches in the original telephone exchanges.