It's purpose was to have electors cast nationwide votes before mass transportation existed. In it's current form, it is completely a left over from a racist past.
http://www.salon.com/2016/12/15/the-electoral-college-born-o...
Also, if a democratic candidate is your 2nd preference, and you're in a non-safe state, and you don't trust vote trading, you should most likely not vote for a spoiler candidate, and vote for your 2nd preference democratic candidate. If a democrat isn't your 2nd preference, go ahead, do what you want.
The mechanics of the electoral college make this much pragmatism and tactical voting necessary for any American voter I'm afraid.