Being responsible about which items you put down your drains is the best way to avoid problems in your home’s plumbing. If you experience a leak or a flood, installing a water alarm near your water sources (shut-off valve, drains, hot water tank, etc.) is a good way either to prevent flooding, or at least catch it early.
In areas with a higher risk of storm drain flooding and sewage backups, consider getting a sump pump installed to help prevent floods and backups in your basement.