Oh fantastic, no one else posted this concept yet
So, I think there's an important connection there you're touching on. Samurai and cowboys occupy the same space in media, and I'll give you some examples.
Someone else mentioned the movie, but Seven Samurai, a HIGHLY influential and well received film from japan in the 50s, helped inspire The Magnificent Seven, a key cowboy film from the early 60s.
The film Yojimbo (please watch it if you haven't, it's just very well done, really funny, have to get over the 'movies had NO real soundtrack back then' problem if you're not used to old films) is like watching The Matrix AFTER you've already seen the slow-mo and 'i know Kung fu' tropes in movies. The man rolls up into town, two sides opposed and neither really 'good' but innocents in the middle.
What were called 'spaghetti westerns' in the past due to the Italian directors at the time, a majority chunk of those movies utilized similar filmography techniques and plots. The kids who watched those westerns also watched samurai films (cheap movie is a cheap movie on a weekend night) and the concept sort of melded over time to where the Ronin of Japan and the Lone Ranger of America are two flavors of the same steel-wielding hero.
The way samurai in movies revere their swords, talking about the efficiency of a weapon, the artfulness or it, all VERY similar to how revolvers took/take a center stage for western fantasies. Add to that the individualism of the west, the rugged nature of a traveler with a weapon, the tie-in of 'honor' in both cultures, the 'only lawmen can have a weapon in city limits' laws that were featured in the America AND Japan at that time.
Super neat