In your hypothetical situation, the lender reserves the right to demand proof that the cash is okay. They could ask you to provide past income tax returns showing your income levels, plus past utility bills, letters of reference from landlords, etc. They could ask what types of credit cards you have and want to know how you pay those bills (money orders purchased at the corner convenience store?). You may have to produce several character references who can swear you've never, ever used a bank in your life. It's still going to be up to the lender. If you look believable and sound believable, the lender may decide to work with you. If you don't look & sound believable, then you'll be looking elsewhere. They're not going to go to jail because of you!
I know personally that what you've described will work. I grew up in NE Ohio, not far from a large number of Amish and Mennonite communities. I even worked at an Amish-owned business during high school. They save their money up, sometimes in their barns, nowadays more in Amish-owned banks. I have a good friend I've known for over 35 years who is Old-Order Amish - the kind who don't have electricity in their houses, who don't own cars, etc. - and I saw him purchase his current farm in 1972 for $200,000 in cash. He and his wife had saved it up, and much of it was inheritance money from their fathers when the fathers passed away - because they didn't use banks.
So, it's possible. However, should you try to make a home purchase this way, it may or may not happen. Regards to all! Jim D/Heathsville, VA