I would like to have a system when I know what I did, what is opened/installed/activated and what is not
You sound like you need to to look in to Nix and NixOS. The TLDR is that everything is declared in a configuration file(s), which you can and should back up in git. The config files tell you exactly what you did , and the config file comments together with git commit history tell you why.
The whole system is built from this configuration file. Rollback is trivially easy, either by rebooting and selecting an older build during the boot manager, or reverting to an older git commit and rebuilding (no reboot required, so usually faster)
Now fair warning, Nix (and NixOS) is a big topic, very different from normal way of thinking about software distribution and OS. Nix is not for everyone.
You should also at the very least have a git repo for docker-compose files for your services. Again, that will declaratively tell you what you did and why.
Also, if NixOS is too extreme, you should also look in to declarative management tools like Ansible etc
Reading your post again, you should start by moving your docker management from CasaOS to vanilla docker-compose files, and keep them in a git repo.
I still think you definitely should look in to NixOS and what it can offer, cause it seems like that is where your mindset is going.
But NixOS is a drastic change, you should start by just converting your individual services one by one from CasaOS management to docker-compose files. One compose file for all services is possible, but I would recommend one compose file for each service. Later you can move from Debian to NixOS while using the same docker-compose files.