No, unfortunately ALL entities need to be loaded before Homekit starts. If you receive an error at startup for whatever reason (and you didn’t notice it) there is a great possibility that it did not load all the entities. If so, homekit wil treat them as “new” devices thus resetting everything. (I had massive problems with this, as my xiaomi gateway had problems loading sometimes, I need to cut the power to that device before it will be recognised again). Also resetting your mqtt database will do the same thing. My personal advice is: move away from Homekit if you do not really need it. Home Assistant is extremely customizable and you could basically make almost the same interface as Apple’s one.
If you do rely on Homekit then I can only suggest you make absolutely sure everything is loaded before Homekit starts. Changing an entity in any way will also trigger Homekit to treat it as a new device.
Edit: I have used OpenHAB in the past, this has the same problem.