I'm a big fan of sumps (got used to them with my reef tank), but with a 40 gallon tank, you's see a lot of people with canisters or HOB filters (like AquaClear) especially if the tank isn't drilled.
Substrate is one of the things I like to decide on after I select what types of plants and fish I want to add: bottom feeders (like cories) will get scraped up on a substrate like flourite so you'd need something finer/more rounded. You don't need to spend a fortune on substrate in my opinion unless you are keeping a shrimp tank. The buffering/cation exchange capacity of a substrate doesn't matter (in my opinion) unless water is actually constantly flowing over it, like if you have an undergravel filter. But those aren't usually recommended in a planted tank because you'll end up with roots tangled up in it and it's a PITA to deal with.