What is the role of a chemotroph in an ecosystem?
Chemotrophs are usually found in extreme environments where they can be the source of all energy for the ecosystem also called the primary producers. Deep-sea hydrothermal vents are a great example of a chemotroph primary producer and support the growth of large eukaryotes like the tubeworms (Below). The chemotrophs supporting life at the vents can oxidize Sulfur to create ATP.

But chemotrophs don't just have an impact on these small ecosystems, they are actually responsible for earth-scale geochemistry affecting all life. (Cool paper on that here). The reason why chemotrophic bacteria are usually not found in &quot;normal&quot; environments with algae is simply competition. A heterotroph using hydrocarbons will occupy a niche faster and more efficiently than any chemotrophic bacteria.
You are definitely right on the Mars soil question, where chemotrophic bacteria could be used to fix carbon or nitrogen and solubilize nutrients for future plants on mars. But maybe some cool chemotrophs are already living there!