Some power banks have momentary voltage interruptions when they lose power, which would make them unreliable for UPS purposes. You can test for it, but I find it hard to trust them.
You can get a UPS with a USB port and then use Network UPS Tools to monitor it. This enables you to also power your modem/router so that openHAB can send you a notification, but if you buy a small one then you’ll only get a few minutes of operation before NUT has to shut it down. Meanwhile, a large UPS takes up more space and can get expensive in a hurry.
I recently came across a few mini UPS devices like this one and this one on Amazon, and I’m intrigued. It makes a ton of sense to just have 5V/9V/12V outputs and not waste energy converting back and forth between AC and DC. However, the 5V USB ports on the ones I linked to only output 2A, and the recommendation for an RPi 3/4 is a 3A power supply. I’m not ready to buy a mini UPS, but I’m keeping an eye out for improvements.