...replace the HD drive with what? An external drive?
If that is acceptable to you, sure, that's one option.
HD was corrupted and after running disk repair, HD is fixed... then.?
It is possible for Disk Utility to "repair" the HD to the point that it can be mounted. Disk Utility will report that it has been "fixed" but it might not survive even the next boot attempt.
The reason it can no longer be relied upon that whatever anomaly caused the corruption to occur in the first place will remain. Those causes are often microscopic environmental contaminants (e.g dust, pet dander, smoke particles) that accumulate within the less-than-perfectly sealed enclosure, causing head crashes and the corruption that results from them. If the drive survives long enough its spindle will eventually wear to the point it becomes rotationally unstable. In either case, it's junk, throw it out.
Hard disks are all wear items that will require eventual replacement, and yours is (I'm guessing) five years old or so? Fortunately hard disk drives are inexpensive to purchase, but replacing an iMac's internal hard disk is a tedious procedure. You can do it for considerably less than $100 if you are mechanically inclined and sufficiently motivated, or Apple can do it for $400, perhaps a bit less.
Solid state drives used in newer Macs don't have those problems, but they have other failure modes so they don't last forever either.