What were the original methods for determining atomic weights?

I am reading "History of Chemistry" by William Brock and I am confused about the original methods (early 1800s) used to determine molecular weights and hence determine the correct formulae for pure substances. Now I may have the order or link between ideas wrong - which is why I am looking for clarification here. All of what I write below is "as I currently (mis-)understand".


Lavoisier is credited as introducing /emphasising the importance of accurate measurement when conducting chemical investigation.


In order to write chemical equations that capture the correct formulae of products and reactants in an irreversible reaction that runs to completion, some method of measuring the "quantities" reacting and produced is required.


By measuring masses before and after reaction in a closed system we can demonstrate conservation of mass in a chemical reaction but not much else.


The (a?) key to determining correct chemical formulae for compounds is some way of determining the "quantity" of reactants and products rather than mass. We can't use mass as the **direct** measure of "quantity" (was this ever tried?) because of the differing atomic/molecular weights of reactants and products (simplistically, comparing two samples of different pure materials of equal mass/weight the material comprised of "heavier atoms or molecules" will contain fewer atoms or molecule than the other (\*)). The only means in the early 19th C available to determine "quantities" was gas volumes.


Now a bit of cart-before-horse here. Using modern notation and terminology


The reaction of hydrogen with chlorine


$$\ce{H2 (g) + Cl2 (g) -> 2 HCl (g)}$$


Which I can interpret by Avogadro's law: 1 volume (mole) of hydrogen reacts (violently) with 1 volume (mole) of Chlorine to form 2 volume (mole) of hydrogen chloride gas. 


Now where I have a problem (discernable to me) is this:


How do we ensure or know before we conduct the experiment that we have the correct volume (number of moles) of each gas so that there is no unreacted "reactant"?


For example mixing 4 volumes of hydrogen with 1 volume of chlorine would give


$$\ce{H2 (g) + Cl2 (g) + 3H2 (g) -> 2 HCl (g) + 3 H2 (g)}$$


4 volumes of hydrogen plus 1 volume of chlorine (5 volumes of reactant) produces 2 volumes of hydrogen chloride plus 3 volumes of hydrogen (5 volumes of "reactant"). Conclusion: hydrogen and chlorine react in the ration 4 : 1 ???


Separately, I assume the analysis and interpretation of volumes to determine the reaction is trickier for gaseous reactions that establish some kind of equilibrium such as hydrogen and nitrogen forming ammonia, the position of equilibrium (in a closed system) depending on the pressure and temperature?


Another follow up - a very basic question. Is it correct to say that once the atomic / molecular weights are established we can then work out correct empirical formulae for compounds but not molecular formulae.


(\*) This idea of course depends upon the idea that different types of atoms have different "weights" but isn't that Avogadro?


