I try to never delete anything, and write things down...even if it’s 100 chapters in the future in terms of plot. A half scene, even if I know I’ll rewrite later, is nirvana in terms of having goal posts to write toward. I’d hand sketch out maps/blueprints, still good years later, notes, etc in spiral notebooks. I’ve still got the spreadsheet I started two decades ago, and that really helps. Having a naming system for the files helps too, thus I typically use something like YYMMDD-description.txt for the various snippets, which is, again, really useful in the rewrite many years later.
It is funny to think that I’ve been working on this story for decades, and will likely still be working on it for decades to come… however, it’s nice that it’s being reworked into a much better story IMO.