How to clear an Android device without losing root? I am considering selling an Android (KitKat) phone that is rooted.

Normally, when selling a phone, I would recommend performing a factory reset.

Do root privileges typically survive a factory reset?

If not, is there any way to really clear out everything on an Android phone without performing a factory reset?  Or will some data remnants always remain?
Performing a factory reset doesn't make you lose root access, since the root handling app (SuperSU or KingUser or whatever) is installed as a system app and only the /data and /cache partitions are formatted by a factory reset. The /system partition remains unaffected.