Papyrus of Nakht, Book of the Dead
"Some of the Egyptians hold crocodiles sacred, others do not so, but treat them as enemies. The dwellers about Thebes and the lake Moeris deem them to be very sacred. There, in every place one crocodile is kept, trained to be tame; they put ornaments of glass and gold on its ears and bracelets on its forefeet, provide for it special food and offerings, and give the creatures the best of treatment while they live; after death the crocodiles are embalmed and buried in sacred coffins. But about Elephantine they are not held sacred, and are even eaten. The Egyptians do not call them crocodiles, but champsae. The Ionians called them crocodiles, from their likeness to the lizards which they have in their walls."
--- Herodotus, Book II, 69
The area around lake Moeris was sacred to Sobek, where a full grown sacred crocodile lived in a temple lake. Orilginally named Shedet in Egyptian, Ptolemy I renamed it Krokodilopolis, then Ptolemy II renamed it Arsinoe after his wife. The Krokodilopolis (Latinized Crocodilopolis) name was obviously catchier. The city itself was very significant agriculturally, located in the Faiyum, reinvigorated by engineering of the Ptolemies, it became a major food supplier to the Roman empire.
I do not believe crocodiles were kept as any kind of "pet" simply because I know of no evidence to support it. I can imagine SOME villagers keeping a small, live reptile as a sacred item, but there are simply no tomb carvings of crocodiles being held or in casual association with humans. There are PLENTY of such pictures for cats, dogs, lions, cheetahs, monkeys, mongooses, giraffes, etc. (we know the names of some pets by their collars, detailed in paintings). There are crocodile mummies as sacred items in many tombs and cemeteries, but this level of live animal worship only seems to appear around Krokodilopolis. If you've got a picture or solid source to the contrary, I'd be happy to update this.
If you Google "Nubia pet crocodiles" you will see that some souvenir shop owners today are keeping crocs in basins in their shops to lure tourists. A well fed, small crocodile is pretty complacent to manhandling. Full grown crocodiles simply do not make good pets.
I like this little bit of Strabo. He visited Krokodilopolis around 20 BC, when tourism was booming.
"Sailing along to the distance of 100 stadia, we come to the city Arsinoë, formerly called Crocodilopolis; for the inhabitants of this nome worship the crocodile. The animal is accounted sacred, and kept apart by himself in a lake; it is tame, and gentle to the priests, and is called Suchus. It is fed with bread, flesh, and wine, which strangers who come to see it always present. Our host, a distinguished person, who was our guide in examining what was curious, accompanied us to the lake, and brought from the supper table a small cake, dressed meat, and a small vessel containing a mixture of honey and milk. We found the animal lying on the edge of the lake. The priests went up to it; some of them opened its mouth, another put the cake into it, then the meat, and afterwards poured down the honey and milk. The animal then leaped into the lake, and crossed to the other side. When another stranger arrived with his offering, the priests took it, and running round the lake, caught the crocodile, and gave him what was brought, in the same manner as before."
--- Strabo, Geography, Book XVII, 38/812
"Suchus" is Strabo's transliteration of "Sobek" ... so the name of the crocodile was the name of the god himself.
"Some say that, just as there is a kind of natural antipathy between the Psylli near Cyrenaea and reptiles, so there is between the Tentyritae and crocodiles, so that they suffer no injury from them, but even dive in the river without fear and cross over, though no others are bold enough to do so. When the crocodiles were brought to Rome for exhibition, they were attended by the Tentyritae; and when a reservoir and a kind of stage above one of the sides had been made for them, so that they could go out of the water and have a basking-place in the sun, these men at one time, stepping into the water all together, would drag them in a net to the basking-place, so that they could be seen by the spectators, and at another would pull them down again into the reservoir."
--- Strabo, Geography, Book XVII, 44/815