Elaborating a bit on How To Apply Stacking:
1. Stacking Limits, based on terrain and technology, that Severely penalize Overstacking. In the length of the average game turn, if you cannot supply food and (later) spare parts, replacements and fuel, units start to disintegrate fast.
2. Supply Sources. To avoid the penalties above, they would be, possibly, three types:
a. The Tile the stack is in. Sitting in a friendly city that is larger in Population points than the stack is in Units - No Problem. That tile already supplies that many people on a regular basis. Other terrain - a range of problems, not so much in tiles with Farms, Plantations, Villages or Settlements, and other infrastructure, to really, really serious in barren Tundra or Desert. You should quickly learn to avoid some tiles with large Stacks.
b. A Supply Line to a Supply Source. Source could be that friendly city if it is large enough, or a series of Friendly Cities if they are connected by, say, a Sea Trade Route or navigable River that can transport 100s of tons daily by ship or boat or barge. The length of that supply line would also be heavily dependent on the tile and technology: trace a line using pack animals over Tundra, it won't stretch very far at all. Over roads with motor vehicles = long supply line. Over a railroad to that set of connected friendly cities = virtually infinite on the map. Until, of course, an enemy unit plunks itself down on that railroad.
c. Enemy Tiles. You can almost always pillage the heck out of any enemy territory. That will keep your Stack generally supplied (but less so in late game, when the bulk of your 'supply' is ammunition, personnel and machine replacements not generally available in enemy territory) but only for (usually) 1 Turn. After that, you have to keep moving or suffer Penalties, because as a general rule, a Pilllaged Tile provides nothing to Supply.
Some units should have Special Capabilites vis-a-vis Stacking:
a. Recon units require no supply, but in Non-Supply status in the post-Gunpowder Eras they have 1/2 their normal Attack Factor. On the other hand, they can always reveal the contents of any Stack they are or move adjacent to, and in the late game, that might extend to any stack within a radius of 1 - 2 tiles (using advanced UAVs, helicopter-borne Special Forces, etc)
b. Barbarians, for this purpose, function as Recon Units, but with limitations. They can 'see' an entire Stack over a certain size ("too many troops to hide" rule), but may only give you the size in units and possibly Unit Types, not actual Combat Factors (because they aren't really trained reconnaissance types)
c. Unique Units. There are a host of potential Special Capabilities these could have related to Stacking: For examples
Hardy Troops could subsist on less, so can stack more units compared to 'regular' armies.
Stealthy troops, like most Native American warriors and many tribal warriors elsewhere, could be Invisible to other troops and possibly Invisible within a Stack until in combat.
Many forces are better At Home than elsewhere, so these as Uniques could get some of the Hardy or Stealthy qualities only in Home Territory.