The shock of losing to President Donald Trump a second time has inspired the biggest bout of Democratic introspection since the 1980s.