The most basics of a sump:
Water has to get out of the tank and into the sump. If the tank is drilled, this is best. Over the edge systems are prone to failure. If you want to look into building a DIY, good one, google the Bean Animal and see if that is the way you want to go. I do not have this style, but understand it is almost silent, and almost fail safe. Do not pump it out of the tank. The 2 pumps will never match, and either the tank or the sump will overflow.
Water falling into the sump is often splashed across some bio media, such as a matala mat or poret, or a chamber of bio balls. This splashing can allow too much CO2 to escape. If you can seal the sump with a lid, even a plastic sheet duct taped in place then there is less loss of CO2.
Then the water passes through whatever other media you want.
Sponges, floss, perhaps some peat moss.
The last chamber is for the pump.
On the outlet of the pump you can put a ball valve to control the flow. Most pumps are OK being turned down to about half, but more than that is a bit too low. If you need to turn it down that much it is better to get a smaller pump.
The pump can be plumbed to also pump the water out for a water change. A Tee on the return to tank that is kept capped off most of the time is a good way to do this.
I would also put a fitting in there that prevents water from flowing backwards out of the tank, through the pump. A flapper style of anti-siphon is good. The spring type takes too much pressure to open, not good for the pump.
Auto fill can be plumbed into the sump. I have seen a system where the tap water fills a 50 gallon drum, and has dechlor added, then the 50 gallon drum is the source for the top-off water.