This did not happen much with armies moving in formation like the phalanx, but in the game it does happen .
Completely agree.
I think this should be the goal
From what Brett Devereaux writes, this doesn't happen historically (except in very rare occasions); that's a modern misconception.
Anyway archers should in some situations be able to shoot over their melee comrades, probably not (or with the risk of friendly fire) on the first rank of enemy soldiers engaged in melee, but on the rear ranks. And of course also on the first rank while they charge and are not already engaged in melee.
Also if we want to have ancient battles and not napoleonian ones with swords and arrows, we probably should take kiting into account : yes, missiles can shoot quite far, but without any discernible impact on armored troops.
Only at close range (where an enemy charge can wreak havoc to them too) can they be actually effective. The more armored the enemy is, the closest the range of effectiveness.
That would make for very interesting tactical decisions, and make melee troops the kings of battles, as it was historically (while still allowing missile-heavy tactics like the Persians used, but only if done well, and prone to awful failures if done badly, as the Persians learned at Marathon and Plateia, or against the 10 000).
Indeed, but we also would need better control of our troops.
Putting your archers to the side to shoot at reinforcements and then having them friendly firing at your troops because the AI decided it wanted to shoot at the melee would be very frustrating.