The fear of being buried alive was taken quite seriously. Several prominent people expressed this fear when close to death themselves:
"All I desire for my own burial is not to be buried alive." - Lord Chesterfield, 1769
"Have me decently buried, but do not let my body be put into a vault in less than two days after I am dead." - deathbed request of George Washington
"Swear to make them cut me open, so that I won't be buried alive." - Frederic Chopin's last words
Just as serious were the bell devices themselves, several of which were patented in England and the USA. These were known as 'safety coffins' and designs were registered in the 19th century and up to as late as 1955.
The Improved Burial Case.
Patent No. 81,437
Franz Vester, Newark, New Jersey.
August 25, 1868.
USA Patents Office
Although these fears were genuine, the origins of this phrase (and 'dead ringer') actually has nothing to do with burials. Rather, it was used to describe a boxer who is losing a match and has been given a chance to further the fight with a ring of the bell.
The term dead ringer has origins in horse racing.