Mag 9 would be too powerful and you would need a valve on it or plumb to other reactors and such. Your return should not be the main flow in the tank. It should only be powerful enough to have a turn over rate of 3-5x your display water volume. For expample, your 40gallon only needs a pump that is pushing 150gph-200gph at 3ft of head pressure. You want the water to stay in the sump long enough to be skimmed, heat/cool, clean by refugium, etc..
Besides that, I would look for something else other than Magdrive pump. Ehiem makes very reliable and quite pump. Sicce and Tunze also make very small footprint, quiet and reliable. Remember, you want to look at the pump rating at 3' of head pressure. Don't go by the max gph on the box because that's pumping at 0'