MBP 13" mid-2012. 2x4GB RAM cards. 756 GB HD. Problem as you all describe. As someone else said, bless you all for your experiments and patience and taking the time to record the results.
I followed the same paths many of you describe. Apple hardware test, Genius Bar visits. This thread led me to what has solved the problem for me - it is a spin on the RAM threads and the FOAM SPACER threads contained within this whole post.
Background:
My "barcode display failure" began after back-to-back incidents where I believe my machine overheated because it was not fully asleep when closed and placed in my backpack for a plane ride. Genius Bar pointed to ensuring the "allow network to wake from sleep" button was off. Genius Bar also pointed to selecting "sleep" from Apple menu and waiting until keyboard backlight goes off before closing lid if you'll be "packing up" to go somewhere (closing the lid to walk somewhere and re-open it a few minutes later isn't really a problem).
I mention the over-heating because I hadn't seen anyone else mention it. I do believe it is a contributor.
What I observed was that it _seemed_ like my problems were associated with moving the display. Genius Bar didn't agree after tests and said the disk drive cable needed to be replaced. They did that. Within a week, problems start again. I shelved the MBP for months because work had given me another. I was running Yosemite at the time (I think this is not relevant, but completes the picture).
Last week, I took the machine apart to examine the display cable. Found nothing unusual. Wanting to "jiggle it" while the machine was running, I observed that it powered up consistently with the bottom case off. This was a bit of an epiphany. Jiggling the display data cable had no affect. Nor did generally lightly touching the seated connectors or cables that were exposed.
(from here I put the back on and determined not to move it but reformat the hard drive, reinstall Yosemite then upgrade to El Capitan. The ability to do all of these things would tell me whether or not the machine was actually any good. NOTE - I still hadn't found this thread, or I'd have been saved loads of time.)
I closed it back up and found that, as many of you describe, "squeezing the case" from the bottom would cause it to freeze. But I could hard reset it and it would boot back up again.
The Aha:
The RAM comments intrigued me. I agree there is a design problem here. I noticed on the bottom case that there was a thick foam pad exactly over the memory bay that was factory installed. I also noticed that now (4 years after manufacture) this pad had compressed considerably and by laying it flat on a table and eyeballing across it, I saw that it was actually dented (thinner than original). Meaning that it likely did not provide the same mechanical support as it did out of the box.
Bit of an aside: Because I was in there, I popped both RAM chips and cleaned the contacts with an eraser then hit both and the rest of the machine with canned air to clean them up. (Because of the "insulating with a post-it" comment above, I looked closely beneath the RAM bay. Mine had OEM foam between the bottom of the RAM bay and the side of the case that is toward the keyboard. Nothing in there was conductive, so I didn't consider the post-it path described.)
My Solution:
Using a double-sided gel adhesive pad that I'd gotten from a hardware store, I cut a rectangle to match the size of the factory installed foam pad. This gel pad is about an 1/8" thick, so a touch thicker than the OEM foam. I added a piece of mylar that was about 1/32" thick, also cut to match the size, to the one side of the gel adhesive pad. I then double checked the pad and every part of the surface with an ohm-meter to make sure I hadn't mistakenly grabbed something that conducted - all good.
I then peeled off the OEM foam from the bottom case, peeled the second piece of backing from my gel pad, and stuck it on there. I then replaced the case, carefully pressing down to level everything up as much as possible.
I flipped the machine back over and learned that the thickness of this pad was _just_ enough to make the aluminum case bump out just a touch on the bottom, making that part of the case the same height as the four corner-feet. I put the plastic case (I think it was an incase) back on the bottom and its fine now.
So for me, I agree with what was posted earlier that there is at least a design flaw in the RAM bay, but it _looks_ to me like the flaw is not electrical, per se, but mechanical. My RAM is aftermarket, but has been in there since early 2014. It could be that the RAM requires the case to stabilize it from both sides to insure no intermittent connections occur. It could also be that the non-OEM RAM that nearly everyone on this thread is using is slightly different dimensionally than the OEM boards Apple installed. Hard to say.
One man's theory I suppose.
I hope some of you find this helpful. It fixed my MBP so I'm happy to have it in play again.
Again - thanks all of you for sharing.