If civilizations continue for millions of generations, where did the waste go to?
Definition: Unwanted or unusable material of a process is considered Waste.
Space: storage of waste requires space, which reduces the space available for other things. The required space for storage of waste can not continue to grow indefinitely.
Matter: While matter doesn't get lost, materials can be altered by reactions and more effort is necessary to extract once it has been mixed with other material as entropy rises (see 1. Recovery of useable material from landfills or incinerator ashes is found to be difficult economically and from an energy perspective (see 2 and the references therein).
If civilizations continue for millions of generations, it must have been possible to reduce to practically zero the amount of material each generation disposes of in a way that makes it uneconomically for future generations to recover or store. In effect, a continuing civilization must have found a way to avoid waste that is lost entirely. Any waste has to become economically useful again later.
The cradle to cradle concept argues that waste is food and tackles the problem by separating materials that can be reproccessed by nature (natural cycles) and those that are not (technical cycles). Whether it is possible to close technical cycles is debated, abrasion makes it likely that in the long run only natural cycles can exist.