If I knew an exact answer to that, I’d have written a few psychology journals solving the nature/nurture debate once and for all, and I’d be using gold bricks to polish my Bugatti Veyron.
Joffrey has several factors that suggest that he’s at least got a few screws loose mentally. He cut open a pregnant cat to see the kittens within, and is known to have a vindictive, cruel streak, bullying his meek brother Tommen.
However, much of his learned behaviors stem from Cersei. It’s Cersei who holds the smallfolk in utter contempt that Joffrey thinks nothing of shooting them with a crossbow. Giving them leave to eat their own dead sounds like it might be beyond the pale even for Cersei, but one quick glance inside her head during her POV chapters leads me to believe that Joffrey could have easily learned such blatant cruelty from his mother.
As far as Robert’s influence, Robert’s biggest claim to fame is great feats, so Joffrey is always eager to talk down, belittle, and challenge others to be like his father, who not so long ago had been an avatar of destruction. His overwhelming desire to please his own instincts also comes from Robert, though Joffrey’s needs are dominance through cruelty instead of Robert’s far more primal desires.
Tommen and Myrcella were raised in much the same environment, though neither seem worse the wear. Cersei’s mothering of Joffrey seems to be the likely culprit, combined with some screws loose.
So, that being said, how would Joffrey have fared under the tutelage of several of Westeros’s great patriarchs?
Tywin would have curbed Joffrey’s appetites, always channeling and forcing him to justify what he does much the way Tywin does. Tywin is just as cruel as Joffrey, and just as willing to answer a slap across the cheek, but less impulsive and more methodical, to truly drive home the blade and let all know once and for all that he is the mighty Lord of Lannister. A Joffrey fostered under Tywin would be, if anything, far worse. Patient and more intelligent, with a fair amount of atrocity happening behind closed doors, with only the gods as witness.
Eddard likely would have recognized Joffrey’s problems at an early age and instilled a sort his sort of nobliesse oblige as best he could. If Eddard could teach Joffrey that instilling awe in his people through his devotion, diligence, and tenacity to doing the right thing was in his own way rewarding, combined with clear measures of affection and approval for doing the right thing, perhaps he could have been rehabilitated. Perhaps not, nature/nurture is a tough thing after all.
Thanks for the question, Anon.
SomethingLikeALawyer, Hand of the King
Eddard raising Joffrey would be Arthur raising Mordred, I fear.