I'm not going to make this too political, but it took a lot of people a lot of effort to change these old perceptions, and not just in Hollywood, in all walks of life.
Twilight Zone was first broadcast in 1959.
The world was a significantly different place back then. Hollywood wasn't alone in excluding non-white actors [and technicians, writers, producers] from their domain.
The word 'diversity' was more usually applied to people who could 'sing and dance' and had nothing to do with ethnic diversity.
In 1959, racial stereotypes were the "norm", not the exception.
Black people rolled their eyes and said "Yesm".
Asians all had pigtails and did the laundry.
Irish all said "Top 'o the mornin'"
Jews were all bankers, jewellers or tailors.
[I could go on, but it's already making me itch]
This wasn't just a 'colour' thing, it was 'anybody who is not exactly like we are'.
These days we find this all risible if not actually horrendous [depends on perspective, perhaps].
Non-white actors in leading roles were not completely unknown, but they were very rare.
The first black actor to win an Oscar for a leading role[1] was Sidney Poitier, in 1963, for his part as the itinerant worker Homer Smith in Lilies of the Field (though he was first nominated in 1958.)
This was a big deal and wasn't to be repeated until Denzel Washington and Halle Berry both won in 2001
By the late 60's shows such as Star Trek were starting to push the boundaries. Star Trek did it by being "not of this time" and so could more easily portray a future where "things were different".
Though I don't know those specific Twilight Zone episodes, I think that they featured non-white actors in 1964 was actually a good first step on the way.
Every journey begins with one step, no matter how small.
Rod Serling - though trying to push boundaries - also had to deal with the current networks and how they wanted to appeal to their current audiences, so was very possibly more restrained than a modern writer.
From your Wikipedia link on The Encounter:
First broadcast on May 1, 1964, its racial overtones caused it to be withheld from syndication in the U.S.
One might imagine Charlie Brooker's Black Mirror may have fewer restrictions to his imagination in this day and age.
[1] I must also mention Hattie McDaniel, as the first ever black actor to be nominated - and to win - any Oscar; though the part she played to win that accolade for Best Supporting Actress was unfortunately also an eye-rolling 'yesm' part. Though potentially valid during the time the plot is set, not something anyone could be particularly proud of in this day and age (other than, of course, she did it, she won, she deserves the honour for doing it)*.
Contrast to the significantly more enlightened Django Unchained
*It's difficult to approve of the actress whilst disapproving of the portrayal that was 'of its time' and express that to a modern audience without sounding like a complete †w@† etc!!