Republicans might make meager gains when all is said and done. But Democrats thwarted Trump’s effort to give his party a huge House advantage.