Thank you DC Ron. I understand and appreciate your comments. Also, I even agree. :-)
Yes, so much depends of the context and what sound ears carry from the previous chord.

Furthermore, so much depends on the style of music. As you know, in jazz, usually melody is written outside or on extensions of a regular triad. This is why jazz harmonies have broad sound. [which I love]

In “I Love Samba”, at the beginning, I purposefully use dissonant chords to build some tension. Cursed b5.:-)
I think you would rather refer to what is happening after….. Yes, harmonization for each chord should be scrutinized and various techniques of harmonization could be used to get maximum smoothness.
In this situation for each note of a given melody a chord should be written. I think this is what you refer to.

In this type of music I often accepted the fact that if a melody note belongs to the chord scale it is OK. I think you would like to hear more passing chords. Therefore more chords should be used especially when melody is played by a group of instruments and this should be done separately from the chords that are played by the rhythm section. So we end up with a full musical score.

In conclusion, automatic harmonization not always works because humans have individual taste and humans decide what sounds best, how many chords to use and which harmonization technique to employ.

In one of my song that I already posted, :-( I have a problem with situation where 6th is in the melody and two other voices play 3 and b7 which is absolutely correct. BTW I love the major 7 interval between b7 and 6, however, in that musical context it sounds harsh and I feel that b7th should be replaced by likely root. Yet, I let it go because I also thought that this sound could be interpreted as an “artistic expression” to imitate a detuned chimney of the ship the song is about.
Well, it is not what Tchaikovsky would do :-) He would rather use a passing chord but it is jazz and I don't expect perfect smoothness or perhaps I got used to rough harmonies.
In the past, in music schools it was forbidden to play and/or even to listen to jazz from this very reason, I guess, and perhaps people don't like jazz because they feel it is sometimes “slightly out of tune” :-).
I hope I am on track.
Thank you DC Ron,
TomZ