Nancy Pelosi would become legendary if she could pull off what Willie Brown did in the California State Assembly. In 1994, the Republicans won a majority (it happens, even in California). The Democratic Speaker, Willie Brown, kept his Speaker position!
I’m not sure control of the House has ever switched in the middle of a Congress. Skimming this list it doesn’t look like it’s usually close enough. Although, it notes that in for the 72nd Congress, fourteen members-elect died before taking office, which switched party control after the special elections to replace them.