I can see that the external hard drive is not ejectable on your Mac may be not only due to the drive's problems. The system and software can also make you can't eject external hard drives on Mac.
I have some suggestions that may help you out of the dilemma.
1. Stop using the external drive before ejecting it
According to my experience, I find that the most common reason why an external hard drive can't be ejected on Mac is that the drive is still being used. Perhaps you've stopped to write any data to the drive, but there are certain programs running in the background continuing to use the drive. You can close the running apps and then eject the drive.
2. Relaunch Finder
As you say the time you can't eject the external hard drive on your Mac, Finder is not responding either. So I suspect that Finder causes the problem. You can force quit Finder and then relaunch it to check if you can eject the external drive then.
- Open Activity Monitor (Launchpad > Other).
- Search for Finder in the upper box.
- Select Finder and click the quit button on the top.
- Choose Force Quit on the confirmation window.
- Relaunch Finder.
2. Run First Aid check the external drive
When the external drive has some errors, it may also make you unable to eject the external hard drive on your Mac. Usually, running Mac First Aid to fix the disk can solve it.
- Open Finder > Applications > Utilities > Disk Utility.
- Select your external hard drive on the left sidebar.
- Click First Aid.
3. Try to use CMD + E shortcuts
As you've tried ejecting the external hard drive with right-click, moving to Trash, and Disk Utility but all failed, you can try to select the drive and press Command + E instead.
4. Restart Mac
Restarting Mac is to verify if there are temporary bugs that make the system fail to receive the command you send to eject the external hard drive.