Hello @Helicity and thank you for your feedback,
attack-move is indeed partly broken, there have been several attempts at fixing it, but there can be quite some edge cases we need to work with. We would love seeing the solution either as a mod or a patch submitted on Phabricator.
Here is the most recent file: https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js, where "WALKINGANDFIGHTING" is attack-move. As for the preference to certain units, you can define those in the templates in the Attack component.
See also e.g. https://code.wildfiregames.com/D3853 for an attempt at improving walk-and-fight behaviour. This is not merged because the method used is very expensive, computationally.