I agree that while electronic harmonizers are much better today than in the past, they still can't completely replicate a second guitarist. Sometimes guitar harmonies stray from just sticking to a strict scale. Which leads me to your next question...
This is a great question! I always tell students that the best way to build your own guitar harmonies is to figure out each note a third interval up the scale, and start from there. In many cases, this method will produce desirable, ear-pleasing results.
Sometimes though, depending on what the chord progression is doing underneath, it may NOT result in ear pleasing results. In these cases, experimentation is the key. Think about the notes that aren't sounding right, and check out which chord is being played (or referenced) underneath. Think about the notes within that chord. Most times, trying a note that is in the chord will work.
At the end of the day, there are no right or wrong answers. Sometimes, harmonies using 4th intervals in between the notes are the best choice. Remember: If it sounds good .... it IS good!!
Hope this helps!
GT Guitar Coach