Sorry, this got really long and I used the spoiler tags a bit more than I thought I would
Alright, so my basis for judging whether or not a protagonist has "heart" or not will be based on who they are at the end of the VN/Anime, since I believe (especially when dealing with Key protagonists, who aren't particularly malevolent) that past transgressions don't necessarily define who they are now, especially if they drastically change in their character arc.
How I am defining heart is generally the archetypical qualities one would assume are associated with someone having a lot of Heart; having a strong sense of compassion, sympathy and develops emotional strength throughout the VN or Anime that the character is in. I also am considering a character's weakness in this, as showing weakness in itself I consider a strength of the heart in regards to sympathy/overall caring (though I know not everyone will agree with me on that). In a lot of ways, for me to say a particular Key protag has the most heart, they have to by the end show the kinder traits that humans possess. Also, I didn't include the protagonists from Air or Rewrite, as I only saw a bit of Air before dropping it and I have yet to watch Rewrite.
So without further ado...
Otonashi: In a strictly objective sense, this seems like the perfect fit, since he has the most sympathizable motivation/aspirations in that he wants to help people who suffered the same sickness that his sister died to. He also signed off to have any of his organs donated to people who might need it. It is evident that he
cares for his friends considerably, especially as the anime goes on. He pushes others to do the things they are a little apprehensive to do and generally is very supportive. By the end, we learn that not only does he have strong morals, plenty of compassion for others misfortunes but he can also show some weakness, in the form of him being heartbroken that his love Angel had to move on, leaving him alone (though he would join her soon enough). That weakness he had further proves that he has a very compassionate and caring personality.
Riki: Another strong candidate, Riki throughout the anime shows a great deal of compassion for his friends. As others have mentioned, some of his actions can be considered questionable, however, most of his intentions are consistently good. In order to have a strong heart, you must also have a strong will and be determined and of all the Key protagonists, I would say this most accurately describes Riki. Despite a lot of the circumstances he saw his closest friends deal with also including having all his friends nearly die in a horrific bus accident , his emotional strength and maturity only grew as the anime concluded. Riki first had to confront his biggest weaknesses in order to gain a strength of heart along with his compassion, and he indeed did so throughout the course of the anime. He went from seeming fairly weak to being the strongest Buster by the end, proving that he has a ton of heart. Though I still wouldn't say he has the most (close second though)...
The Junker (from Planetarian): The way his character is set up, he likely might have the least amount of heart of everyone, especially given the setting he exists in. From what I gathered,
it seemed intentional as the great irony was that Yumemi's character had all of the hope and humanity that The Junker had long since forsaken, despite being a robot . However, by the end, The Junker had become a person who exhibited more heart in his kindness and compassion towards Yumemi especially when she died, he seemed genuinely really sad that the thing that annoyed him so much at the beginning was now gone . Overall though, I don't think that The Junker having plenty of "heart" was ever the intention of his character to begin with.
Yuichi: This character is fairly normal/average in terms of Key protagonists. As the anime (referring to the 2006 one) concludes, he learns to gradually become more sensitive and even compassionate to others (particularily women) and does manage to achieve that like in Makoto's wedding and his interactions with Shiori , though I would say he doesn't grow or develop as much as other Key protagonists do. A likeable protagonist and has some heart, but not enough in my view to take the top spot.
Yu Otosaka (AKA Lelouche): Oddly enough upon further reflection, despite the fact that he starts of as a douche, he grows considerably and by the end, possesses a very strong heart and a surprising amount of character depth. Compare his narcassistic persionality and apathetic attitudes at the beginning (was perfectly willing to endanger the life of a truck driver to appear a hero) to his personality by the mid-end point of the anime showing a uncharacteristic amount of vulnerability and deep sadness when his sister dies and it is clear that through meeting others, he started changing his attitude towards others greatly and started showing a lot more heart. Given the events that he undertook, by the end he became someone who would actually fight for others and for something far greater than his own self interests. In a lot of ways, he has an abundance amount of "heart" through his newfound determination and kindness by the end.
Tomoya: This might seem exceedingly biased of me to have this as the protagonist who has the most heart, but I certainly argue that he does. In fact, Okazaki contains the best traits of all the protagonists I have discussed. Sure, similar to Yu, he started off as pretty dickish. He did, however, have a backstory that helped explain some of his more delinquent behaviors, as the VN says, he was abused as a child by his father. However, as the anime (and VN) continues on, he slowly starts being able to get invested in some of the characters dilemnas (much like Riki or Yuichi). The backstories he learned about in others lives and seeing how deeply it affected them on a personal level slowly helped him become more sensitive to others thoughts and feelings, even behind his sarcastic persona. By the end of the first season alone, he was very much a changed man who already possessed a great deal of heart. He became emotionally invested in Nagisa, who he would ask to become his girlfriend and had shown admirable determination in getting his newfound friends closure like getting Fuko what she always wanted by gathering as many people as possible for her sisters wedding and also recreating the garden for Kotomi like she had as a kid . I would even go so far as to say he helped his friends come to terms with their troubles as much or even more so than other Key protagonists like Riki.
Then After Story happens, and this is really where I think Tomoya proves his heartiness. To contrast, he went from being a person who would scrap with other guys for seemingly silly reasons to someone who fights for others/those he cares to protect. I do recognize that after a certain event (that being Nagisa's death after delivering Ushio) he does become very hurt and hides from his responsibilities and runs away from his daughter much like his Dad largely ignored Okazaki However, even in a irresponsible and selfish act, he does eventually gather the courage to be a better man than his father and own up to said responsibilites. In easily one of the most emotionally powerful moments in After Story, he confronts someone from his past and ultimately admits that despite the circumstances, his father wasn't really that bad and recognized that despite his father's own turmoil, did try and be a father to him. It took a great deal of inner strength and compassion to do so, proving further that despite his failings and mistakes, he still had an immense amount of heart. And by the very end of the series, Tomoya has become a mature, responsible and very compassionate person who despite all the massive struggles he has faced and sins he commited, strengthened the weakness and frailty in his heart/personality; he also has the strong sense of family and morality that Otonashi had, the emotional strength that Riki posesses, overcame drastic obstacles as the Junker protagonist did, became more sensitive to the thoughts and feelings of others like Yuichi had and became someone who cared deeply about others and fought for them after being stricken with guilt like Yu had.
TL;DR: Otonashi in a lot of ways could objectively be considered the protag who has the most heart, as he has shown less selfishness than the other Key protagonists and has an admirable life goal. Riki also contains a lot of heart, since he helps other fellow busters out with their emotional turbulence and becomes strong, despite starting out weak both physically and emotionally. The Junker is still kinda a jerk by the end of it, but considering the purpose of his character and the setting he exists in, it is expected (still puts him out of contention in my eyes for having the most heart). Yuichi does possess some heart though gaining sensitivity by meeting and befriending various females, though he himself I felt recieved a smaller amount of character development, which does hurt his chances for having the most heart. Yu in hindsight has a lot of heart since he evolves rather drastically to someone who fights for other causes after reciving some humbling experiences through events in his life. I know bias does play into my choice a bit, but I feel Tomoya has the most heart since, by the end of After Story, he contains all of the other protagonists best traits that I just mentioned and becomes a much more responsible and emotionally strong person.