A dead ringer is because people used to be buried alive. They'd break their graves and would walk around amongst the living, but people thought that that person was dead. Eventually, a system was put in place that those buried would have a ring, hence dead ringer.
Or, at least, that's what my English teacher said once.
Yes, grave sites were getting hard to find so they dug up the coffins and sent the bones to a bone house and reused the coffins. But they noticed scratch marks inside the lids and thought they were burying people alive so they ran a string up though the ground to a bell. There was a watchman in the cemetary who could hear the ringing and realize they had a "dead ringer" lol