Part of the reason the rear of the seat failed, is because the front leg slipped out. We had tried to use a friction catch on the leg but that did not hold it securely enough.
We looked at cabinet stays and folding / card tables legs and they looked like they would work, but they would not fold down inside of the leg area.
We also considered using a chain or strap, but that only prevents movement one way and we need to hold this from moving either direction.