How about a spring-loaded rod, that is fastened to the inside of the stand, and runs the length of it?
The spring keeps the rod end slightly protruding from the foot of the stand - maybe only 1/2" or less. The stand is free to pivot over it's full range , when the rider is sitting on the bike.
to use, fold out the stand, lean to the ground. The extended end of the rod hits the pavement, compresses upward, the upper end goes into a matching recess. Locked in place!
I'll take a closer look at the stand in the spring. Up to my ears in house renovations at present.
Cheers!