I just use sealing tape -- that way it's not permanent, in case I want to redo the plumbing. Works great! I've had to redo my plumbing a couple of times to get it just right.
As for preventing overflowing, you can mark your sump to the max amount of water you should put in there. The way I found my mark is when I had everything set up and running, I cut the power to my return, and watched the water continue to drain down to my sump. Then, I'd scoop out water as needed to keep it from overflowing. That way, if your power fails, then you know the water from your prefilter tube will only fill up the sump so much before it stops pushing water down. Your return hose should either have a check valve or (like mine) have the nozzle point upwards to prevent water from siphoning back down. Some people drill a hole just below the water line.
Same goes for if for some reason your intake utube fails...there should only be enough water in your return area of the sump so that whatever gets pumped into the main tank doesn't overflow from the main tank. So don't fill your water up to the top of the main tank.
Dunno if this makes sense, but it works LOL My sump is all marked, and my main tank is filled 1 inch from the top.