Since any two men are as mortal as any two others, the Second Congress in 1792 provided for presidential succession beyond the vice president, making the president pro tempore of the Senate third in line and the speaker of the House fourth. There matters stood for more than 90 years.
In a few cases, the president pro tem of the Senate nearly got to be acting president (or president, taking a cue from John Tyler and making it stick). In 1844, for example, President Tyler was aboard the warship Princeton when one of its guns exploded, killing Secretary of State Abel Upshur and the Secretary of the Navy Thomas Gilmer, among others, but not the president -- who had no vice president. Also, had President-elect Franklin Pierce been killed in the railway accident that took his son’s life (see January 6) in 1853, Vice President-elect William R. King would presumably have stayed in Washington DC that winter and been inaugurated president on March 4 -- had he lived that long. As it happened, he died of TB in April after a sojourn in Cuba.
In 1868, President Johnson was very nearly convicted and removed from office. He didn’t have a vice president, so Sen. Benjamin Wade of Ohio, president pro tem, would have become acting president had one more senator voted to convict. Sen. Wade had a vote in the matter, and the conflict of interest in such a case would have been all too obvious. (He voted to convict.)
The Johnson impeachment fracas and the more recent deaths of President Garfield (1881) and Vice President Thomas Hendricks (1885) helped inspire the Presidential Succession Act of 1886, which was enacted on January 19 of that year at the behest of President Cleveland. It removed members of Congress from the line of succession, substituting members of the Cabinet, beginning with the secretary of state. For one thing, it was observed that many more former secretaries of state had gone on to be president than speakers. The 1886 act also made for a longer list of potential successors, and removed the possibility that an acting president would be of a different party than the late president and vice president. Cabinet members would presumably be more aligned with the late president and vice president than a member of Congress.
No one ever became acting president under the act of 1886, though again there were periods when there was no vice president, such as after the deaths of Presidents McKinley and Harding. The act lasted until 1947, when members of Congress were once again put in the succession, but with the speaker third and president pro tempore fourth – a story for another day.