Also the celebrity outlaw goes back to the dime novels - remember the writer character in “Unforgiven?”
And before that there were the British “penny dreadfuls.”