The word comes from the Latin word for lead, which is plumbum. Plumbing by definition is a utility that we use in our buildings consisting of: the pipes, which were mostly lead in US households, and fixtures for the distribution of water or gas, and for the disposal of sewage. The word sewer comes from the French word essouier, meaning "to drain".
Toilets and sewers were invented in several parts of the world, and Mohenjo-Daro circa 2800 B.C. had some of the most advanced, with lavatories built into the outer walls of houses. These were "Western-style" toilets made from bricks with wooden seats on top. They had vertical chutes, through which waste fell into street drains or cesspits.
The word "toilet" came to be used in English along with other French fashions. It originally referred to the toile, French for "cloth", draped over a lady or gentleman's shoulders while their hair was being dressed, and then, by extension, to the various elements, and the complex of operations of hairdressing and body care that centered at a dressing table. The room became the toilet room. For those so inclined, there is the Toilet Museum website.