You would need actuation for horizontal and vertical accelerations that would release springs to drive locking pins.
The pins would have to act quickly because bins tend to come open by themselves in harder landings.
You also need a mechanism to unlock the bins.
I can hear the beancounters wailing in horror at the prospect
Another way would be to automatically lock the bins when the seat belt sign is on -- even more distressing for the beancounters