Barack Obama’s appearances come after the 2024 election left Democrats trying to understand why the party appears to be disconnected from working-class voters.