In armies there is in general a hierarchy. Imagine u have some kind following concept: There is a meta unit. A meta unit can consist of units or meta units. The interface should if possible the same as for a unit. In fact this is nothing else than a hierarchy, but for thinking about it it is a other aproach. This could also help with automated focus fire. F.e. there is a meta unit M consisting out of serveral meta units m which themself consist out of bots. Now if M has a area attack command one m might chose one unit so all the units this m consist off get command to attack this special unit. While all other m may attack other units. Some things to think of meta unit movement and spreadoutness. If u sum up the stats of a meta unit and therefor handle it as one unit would sorians AI be able to work with it. Special ability usage for example transport. Repair/autorecrute not metaed units. Saving loading meta unit concepts. Similar to buildinglayouts. Therefor autobuild commands for factories and metaunits. Hell u could even think about a metafactorie concept.
Re: AI handled as unit out of units. a concept for discussio Supcom 2 automatically took orders, construction tasks, and designated them as a single unit group. Could it be improved upon? Sure. There were some annoyances. The unit cannon was very annoying to use, for example. And I don't think you could assign factory production to assist a unit group.