I seen this since the upgrade to Bookworm. Since running on Trixie (~2026-12), those problems have disappeared.
I don’t think this was an isolated issue because I run multiple Domoticz installations; below you can see the memory usage per instance.
For anyone running on bookwork: if you encounter memory issues, try upgrading.
Upgrading is most easy when you have a spare PI.
1:

2:

3:
