A lot of stand alone "work benches", folding or otherwise, leave a great deal to be desired in terms of stability/rigidity. Permanent is best, but absent the room for that, if you can find a way to anchor your bench, you'll be much happier. Nothing like having your workbench fold up under you or tip over while trying to torque a barrel nut on a several hundred dollar upper!
If you are not opposed to poking a couple small holes in your wall, you can build a simple work bench that will be quite secure, yet be able to store in the back of the closet when not in use. If you have the ability to make the frame from steel, even better, but it can be done without.
It's a simple matter of a top with two folding legs that use pins to keep them in the unfolded position (and folded, if you want), a couple of eye bolts in your wall studs, and simple wooden cams on either side to push out from the wall, tensioning the bench against the eye bolts.
You can also use threaded anchors in the studs if you don't want anything sticking out of your walls. Then just use large thumb screws through a back splash on your bench.