That's considered reasonably effective by the militaries, and fully within the capabilities of many cheap quadcopters.
More advanced "loitering munitions" (essentially, drones that fly around until they're sent to slam into a target) were used in the recent Nagorno-Karabakh conflict.
I believe that all these cases were human-in-the-loop for various reasons, but the possibility for automated targeting seems reachable soon if the armies would really want it (which is not certain).
In another case, small CoTS RC planes did significant damage to a Russian airbase in Syria [1].
[0]: Death From Above: The Drone Bombs of the Caliphate https://www.bellingcat.com/news/mena/2017/02/10/death-drone-...
[1]: Russia Offers New Details About Syrian Mass Drone Attack, Now Implies Ukrainian Connection https://www.thedrive.com/the-war-zone/17595/russia-offers-ne...