The only atoms that are lost in the synthesis of an ester from a carboxylic acid and an alcohol are the elements of one molecule of water. No carbon atoms are lost. It would be possible to produce hexanoic acid from hexane through oxidation, as you wrote. But some other things that you wrote are not correct.