Absolutely 100% all of this, though with a lot of other tricks like caveman mode and careful skill files and helper scripts to help the agent quickly surgical extract out just the useful output, you can substantially reduce token burn and improve its memory.
As well as carefully having it rollback changes everytime a fix doesn't work, and having ut keep a markdown file log of each fix it tried and the results, so it can review each thing it tried previously.