Totally agree, mouse over healing is the most efficient way to heal. Would probably be best to force the game to prioritise in the logical way so you only need to make the macro a one liner.
I made the same macro as the OP mentioned a few months back and had all the same issues. It's unreliable so i've gone back to click targetting, which has it's own issues.

/ac "cure" <mo>
If no mouse over then heal target
If no mouseover or target heal self

Cant be that hard can it?