Is there a design that doesn't have that problem and without making the foot-room situation worse
Have you ever seen a folding walker? Here's a picture:
The whole point of a walker is to support someone, so it needs to be stable in all directions. Lateral stability is provided by the parallel tubes in which the two frames pivot.
You could use a similar design for a tray table: a front panel connecting two frames which each swing out, or a two-legged front frame with two swing-out gate legs. Such a design would provide more foot/leg room and more stability, and would fold into a flat unit. I'm sure I've seen folding tray tables that use this concept.
Another option would be to build a set of nested tables that don't collapse at all, but which fit together in roughly the same space that a set of folded tray tables would occupy. These tables can be much more stable because they don't need to fold, but of course the tables need to be different sizes so each one fits inside the next larger one. You can make nesting tables to match any furniture style. Here's one image (although I like this style better):