Not Immoral, Not Unintended
The personal, moral quality of heroic action seems so clear to me that I can only clarify it by contrasts.
In the fictionalized, historical setting of Band of Brothers, the Allies first liberate the Dutch town of Eindhoven, but the townspeople do not celebrate them as heroes for long (“Replacements”). An intricate analysis could be made about this case, since so many individuals were involved and since it mixes history with fiction, but the actions involved, taken as unit, cannot be taken as heroic through and through.
In a less serious, less complicated case, Firefly’s Jayne benefitted the people of “Jaynestown” in an episode of the same name. But the action by which he benefited them was by no means morally outstanding, and he did not intend the benefit. The man to whom the people intend to pay tribute, so to speak, is more heroic than the man to whom they do. They worship him under a brittle delusion.
In the recently released Superman vs. the Elite, Manchester Black and his team use unnecessary, lethal force to subdue their foes. The Elite represent the sort of hard-edged hero that was so craved after in the 90’s, but surprisingly they do so without guns, spit, or stubble. Manchester and the rest of the Elite take their hard-and-fast, devil-take-all approach specifically in opposition to Superman’s. They take it as intentionally as anything can be taken, but they are less the heroes for it, and it is up to Superman to change their approach or to become a victim of it.