Space is critical, and you are correct on factors.
There are studies now showing that the numbers in the group of a species are significant to the point of being critical. Fish in small groups like five or six showed increased aggressive behaviours, and a latency to feed. When fish are hesitant to feed, you can be certain there is a serious issue behind it. We have known for some time that inadequate space produces similar reactions. But clearly shoaling fish must be in groups of sufficient size or they immediately have problems, which may be stress (the direct cause of 90% of all aquarium fish diseases) which weakens them, making them susceptible to various problems they should otherwise be able to easily deal with. And interestingly, having a group of say 10-12 of a species will have less impact that a group of 5 or 6, due to the stress factor.
The swimming activity of a species is the guide to how much space it needs in order to realistically function normally. Sedate fish need less space that very active fish. Turning to Ember Tetras and pygmy cories, these are not especially active in terms of swimming laps down the tank as say rummynose tetras are. Rosy Tetras do not need as much length as Rummynose Tetras, though in terms of mass they are probably fairly equal. Pygmy cories are certainly generally active, but they do not swim lengths. In a 10g with chunks of wood and plants including floating, these fish will swim from surface to surface, browsing every plant leaf and chunk of wood looking for food. They do not need lengthy tanks, but the larger species do need the length to some degree. I had 30 pygmy cories in my 10g tank at one time (largely fry from the original six). I had a 10g tank with no filter, just a heater and plants, housing 11 pygmy cories and 12 dwarf rasbora (Boraras brigittae). This tank ran for a year, with just weekly 50% water changes. It was an experiment of sorts; it also had no overhead light, just window light. I finally moved it and added a light and a sponge filter which did make the water clearer, but the fish seemed to be quite content all along.