Probably getting carried away, but I guess there are any number of ways of doing this. I decided to do the simplest:
http://www.ebay.com.au/itm/Collision-Sa ... AC:AU:3160Seems to be a microswitch activated by a weight in a well, sideways motion moves the weight upwards activating the switch which latches. Thus you need to physically reset it. Should it fail should be easy to bypass. Would only take a few minutes to install. Made in NZ, not China, if that helps.
These are available from Minisport S.A. For 30 bucks. Appear simple enough..