No, you CANNOT do this to a jailbroken phone. It will go into a reboot loop.
The only way to completely erase everything is to restore it - and loose the jailbreak if you're on a newer device.
I've been in a similar situation, dealing with a phone that I had to sell unlocked. You can delete all of the app store apps you've installed; they'll go away without a trace.
For all of the other things, just go down the lists in Settings and sign out, remove, and delete everything that has the option. You'll have to use iTunes on a computer to get rid of music and videos.
Some Cydia apps do not remove data when uninstalled, so if you have any sensitive info youll need to look at those a little more carefully.
JustMe'D,
Be careful with giving advice in a jailbreak-related thread if you don't have any experience with the particular issue. Hopefully OP didn't try your suggestion...