Chemicals are carried in ships in two ways. Firstly, in specially designed and constructed chemical bulk carriers with chemical cargo tanks. Secondly, chemicals can be carried in a packaged form e.g. in drums and stowed in a container carried by a container ship.
When the cargo tanks in a chemical tanker are cleaned, no residues are allowed to be pumped overboard. Either through human error or the crew breaks the regulations, chemical residues have been pumped into the sea, but this is very rare.
Chemicals are very hazardous. Special regulations apply to how chemicals are carried on a ship. For example, some chemicals must not be loaded in the same shipping container as other chemicals, because, if they leak, they may either let off poisonous fumes or catch fire.
Chemical pollution can happen if shipping containers are not properly stowed. During bad weather chemical storage containers inside a container could become dislodged or break open allowing chemicals wrongly loaded to mix with other chemicals.
Pollution of the sea, release of poisonous gases, explosion and/or fire may result if a chemical tanker runs into trouble. A ship could run aground and break up or be involved in a collision with another ship. This type of incident can lead to a catastrophic disaster. Fortunately this rarely ever happens.
Chemical tankers are specially designed, built and maintained. It is very rare for one to suffer damage through poor maintenance.