Default Factory reset without unroot

My phone is getting a bit sluggish and clogged up so I was thinking of resetting it but I don't want to lose my root. What's the best way to do that? I don't mind everything being deleted etc. Just want it to be like it was when I bought it, just with root! If it's too much of a fuss obviously I'll reset and reroot, just wondering if there's a way to avoid it as it's a convoluted process.
Thanks in advance