Devices for separating liquid or solid substances from sewage, e.g. sand or sludge traps, rakes or grates