...the logistics of conquering an entire planet from space are mind boggling. Imagine the issues with supply you would have in your little spaceships compared to the entire world of resources your enemy would have available, and the sheer numbers of troops required to effectively conquer and then control a planet of billions, all of which must be shipped across interstellar space.
But that's approaching space conquest with the same sort of unrealistic conservatism as when starships go pew-pew at visual ranges.
Surely a conqueror would start by clandestinely dropping a tiny container of powerful poison, and then send an ultimatum calling for unconditional surrender or everybody dies within three days. Once the victim surrenders (or dies, it's his choice), antidote gets delivered in a fashion ensuring absolute and eternal servitude (or death, again feel free to choose).
The invading force only needs that one container and then one ship distributing the antidote. The victim is the one requiring logistical support if he's to try and somehow wriggle free. Heck, have it be him who builds the mighty space fleet that delivers all the loot to your doorstep. If he tries to deliver anything else, he's dead.
This logistically lightweight war can still be fought because anybody can launch a poison canister...
Then we consider expenditure and loss - you have already pointed out the phenomenal cost in lives that Star Trek war involves, for no apparent reason. It is possible for Commodore Decker to effectively control a Constitution class ship by himself
...But all his horses and men can't keep that ship in fighting trim if there's battle. Key to survival in battle involving effective defences such as Trek shielding would be self-repair, and the Borg have one working approach to that while the others have taken another.
Then the losses in terms of resources, always scarce in deep space, even in the age of replicators and warp drive.
What resources would be scarce? If Earth suddenly ceased to exist, truly starfaring folks could build another out of the materials found in Sol system already, including the people. By venturing a bit farther out, they could build a dozen spare Earths.
It's really vice versa. Why bother to go to war when you already have it all? And the ages-old answer is, so that the other guy has nothing. Because else he makes sure you have nothing.
The concept of AI was never adequately explained in Star Trek. On the one hand we have Data who is this super advanced android AI and seems to be unique in Star Trek yet we have holograms gaining sentience every other episode. AI would have been much further along in any of the Star Trek eras and should have been more prominently explored. Even without android's there should have been a lot more robots doing the mundane day to day and/or dangerous tasks.
But you are talking about two separate things. Why should AI and robots go hand in hand? Surely AI would be more effective without robotics and vice versa - robots are for dumb labor, after all, and AI goes beyond the limitations of mere flesh/metal.
Star Trek has advanced AI - all the starship computers pass the Turing test, even when rules of modesty apparently require mutilating their vocal cords. Starfleet also has advanced androids. But combining the two never seemed like a popular idea in Trek, and indeed there wouldn't appear to be pressing reasons. Data and his folks are marketing gimmicks for Soong's great invention, but (hence?) they remain unique in a world awash with AI and robotics.
In the other shows, especially in the Dominion War it gets kind of silly that the ships do their fighting at sublight speeds and essentially just bitch-slap each other while within spitting distance of each other. Though, to be fair, it does make for more exciting television/movies than the realistic approach, and indeed even what we saw on The Expanse eventually led to the ship getting boarded and far more exciting close quarters personnel combat taking place.
Of course, the real world is rife with examples of limitations not apparent from the technologies used. In WWII, with precision long range naval cannon, what did the ships try to do? Dash as close as possible to the enemy, to avoid high-angle fire and make better use of their armor belts. What do the pilots of superfast jet aircraft with BVR missiles do in order to defeat their enemy in practice? Slow down, turn tight, look around with their helmet-mounted sighting devices, and ultimately down the enemy with a stupid cannon. How does the infantryman with his kilometer-range rifle evolve for the modern battlefield? By adopting a glorified submachine gun and rushing to bayonet distance of the opponent.
Heck, DS9 fighting is very akin to WWI naval warfare, in which point blank ranges and unholy melees decide the outcome due to shortcomings in communications, the range of secondary and tertiary weapons vs. the rate of fire of the primary ones, etc. Just negate communications with suitable jamming, and it's every ship for herself. And if you can't get your shorter-ranged beam weapons to bear, you may outnumber your enemy but he will still outgun you thanks to sending his lesser ships up your face.
Timo Saloniemi