Question: In the year 2500, the main planets are all colonised for various reasons (Mars as another place to put the population, Mercury for minerals, etc.). The planet Mercury then becomes more and more rich, until its ruler declares himself emperor. 

In the year 2900, a war starts, lasting until 3000. At the end, people have been reduced to almost stone-age technology. My question is this: how would someone attack in a way that the people survive, while knowledge disappears.

Answer: 
This is a tricky proposition. Firstly, if planets like Mars and Mercury are inhabited and settled there needs to be a high level of environmental and life support technology in place. Remove that and everybody dies. However, it is a requirement of the OP that they remain alive. Not entirely impossible, but it will be necessary to come back to it.

After one century of warfare, everyone is reduced to almost stone-age technology. So their knowledge has disappeared. Now how to pull these threads together?

Assume highly automated technology, so highly automated, self-regulating, self-maintaining, and self-repairing that it's been centuries since humans had to do anything with their technology. No-one needs to be trained to be an engineer, repair person or anything technologically oriented.

So a century ago, the war begins. It starts with a phase of cyber warfare that prevents humans from controlling their machines. Just say "Open the pod bay doors, please HAL." To find nothing happens. Humans find their access to the knowledge about how their technology works is also locked up. Totally inaccessible. Now they are completely knowledge deprived. Previously this is knowledge they didn't need as the combination of AI and cybernetic control systems mean the machines could take care of themselves

Humans can survive. They live on inside their life support and habitat facilities on planets like Mars and Mercury. They are reduced to what is effectively a hunter-gatherer lifestyle. Hunting what had been previously livestock and zoological specimens. Gathering edible plants from what had been parks and gardens. They have learned how to make primitive stone tools.

This does mean by 2500 human habitats were gigantic structures occupying spaces, that collectively, would be size of small nation states. Life support and environmental systems keep humans alive inside their habitats on the settled planets of the solar system, but humans are forced live their lives as palaeolithic savages.
Other Galaxies
==============

Probably not because unless there was a crazy breakthrough in technology that would allow us to explore all of the other galaxies in this universe. And plus we don't know if there are or aren't any other planets in our universe that are as technologically advanced like us. And the only way to remove all technology in the universe would be by somehow exploring every part of every galaxy in the universe, and removing all living species and removing all the technology that they have.

Constants
=========

Even if this were to happen we would be operating technology at the moment of trying to remove all technology, making it almost impossible to ever complete such a feat, and an exponentially less chance in 100 years.