I wonder if attention span can be increased somehow.
Also related, I noticed context switching from one deep task to another requires significant energy and time, I also wonder if that can be optimized.
It occurred to me that it would be beneficial to use flashcards to trigger the memory. It sounds unconventional/unorthotodox use of flashcards but why not. Take screenshots of your codebase/functions/commits, capture progress on your workbench, take little notes of your progress/procedures/learnings/recipes and resurface them. I'm sometimes annoyed to rediscover a useful tool I made time ago.
I yet haven't done this systematically, much less using a SRS, but it is sure worth a try. Difficult to predict when this is worth the effort. But it's a good habit to keep "lab notes" anyway.