You might find this interesting
It receives and sends loconet messages over mqtt which are (in other videos) fed to Node-Red to react to.
I expect that it would be possible to detect your database changes and send a message to the gateway.
That's always the way when you try to demonstrate 'repeatable' faults, they never happen - but tomorrow, when you're not looking....
Np, the same flow on the monitored Pis could also subscribe to a command topic that wold alow your master to reboot them (assuming they handn't totally crashed), or any command you care to implement really.