For my outdoor grows I always remove about 1/3 of the existing soil and replace it with my own compost from my composters then amend with perlite, greensand and kelp.
Indoors I've just started amending by top dressing with EWC and my plants seemed to live this. I never knew it helps with gnats that's great! I'm seriously kicking around the idea of ordering red wigglers? And starting a small EW
farm