I think you're right about the 12v battery. How often do you charge the high voltage traction battery? Is the 12v battery getting low because you have a dash cam or any other connected accessory?
One 12v battery powers the engine and is located under the boot floor of the 530e. The other is an auxiliary battery that powers the electronics and is located on the right side of the boot, beneath the fuse board. If you have adaptive suspension, etc., there might be a third as well.
If the high voltage traction battery isn't charged, the two batteries will run low on power, much like a car that only uses its battery for short trips. Being a plug-in hybrid electric vehicle, it requires some sort of electrical connection.
I would check this first, however a fault code scan is necessary for absolute certainty. An easy way to check if the problem goes away is to charge both 12v batteries. Begin with the Auxiliary and use a good 12v battery charger, such as a Ctek or a Victron blue.
Simply put, if your vehicle is still under warranty, you should allow BMW to inspect it.