Kristen McDonald Rivet won a tough House race in a heavily white, working-class area even as many Democrats in such places lost. In an interview, she warned against a “tone-deaf” economic message.