Let $S$ be a finite collection of finite non-abelian simple groups, for example $S=\{ A\_5 \}$. I am looking for infinite residually-finite finitely-generated groups $G$ such that the composition factors of each finite image of $G$ are in $S$. Are there such examples? 



Infinite, residually-finite, finitely generated, groups with very limited composition factors of their finite images.
Theorem 1.27 of <https://arxiv.org/pdf/math/0510294.pdf> gives 63-generated, residually finite, just infinite groups with the property you want for any set of simple nonabelian groups. The construction is due to Dan Segal. See Dan Segal, The finite images of finitely generated groups, Proc. London Math. Soc. (3) 82 (2001), no. 3, 597–613. 


**Original Answer.** Peter Neumann constructed finitely generated just infinite branch groups all of whose finite quotients are iterated permutational wreath products of $A\_6$ and hence have only $A\_6$ as a composition factor. See example 1.6.6 of <https://arxiv.org/pdf/math/0510294.pdf>. 


