On the main question, it's not that democrats are out of touch. They simply refuse to engage where voters are. Immigration for example. You can drag out any graph or study showing levels where immigration are optimal but you have to concede and acknowledge the costs. Because the swing states aren't overly burdened, they keep their views in line with what they believe their voting block would like. They sloganeer on the positives, on the charity of the average American, but ignore those that experience issues. Worse yet, they label them xenophobic, racist etc.
Selectively some here want to say "because they are!!" And that's why you lose people. If trade workers complain about downward wage pressure, I don't see much sympathy. Watch those same people cry bloody murder at expanding h1b visas.
We have to acknowledge everyone is going to advocate for their own self interest. There is nothing wrong with thay.