If New York had narrowly gone for Adams, instead of narrowly going for Jefferson, then he would've been re-elected. One way for this to happen is if Hamilton had been able to swallow his ego and he decided not to publish his ant-Adams rant before the election. But even if he'd won Adams would be working with a Republican House, so that would stymie his domestic agenda. He purchases Louisiana from France in 1803 and he probably starts West Point the year before. On the whole, Adams would be remembered as a very good if not a great President.
As for 1804, after two losses I don't think Jefferson would run again. George Clinton is the more likely Republican candidate and after 8 years of a Federalist President he would probably win. After that he is probably re-elected in 1808, although he could very die in office in 1812. I'm sure his VP would be elected to a full term in the fall, as 1924 and 1964 show voters don't wan't three Presidents in one year. By 1816 the Federalists may return to power, perhaps under John Quincy Adams.