The other thing to note is that integration of "foreign" genetic material also happens inside of individuals themselves, e.g. the famous cases of gut bacteria or mitochondrial DNA. One general puts a lot of emphasis on inter-species competition, e.g. predators and preys, but there's a lot of cooperation and symbiosis happening at all levels too.