I have used a different approach to replace the keyboard on an A1502 MacBook Pro. The rivets are difficult to remove on the A1502 (ripping out the old keyboard almost always leaves the rivets in place). I leave the rivets on the frame, install the new keyboard, and then apply very small dabs of epoxy over each rivet. This often requires clamping down the keyboard to hold it in place, and sometimes several iterations of clamping + glueing are required. But the result is a keyboard that's solidly held in place by dozens of epoxy joints.
I had exactly the same freezing issue with an older 2008 MacBook; the black bars on my screen looked identical to those in your pictures. After swapping out logic boards without solving the issue, I finally found out that one of the RAM modules was going bad. The problem disappeared with fresh memory modules.