I use Obsidian, which is quite powerful with their vast plugin library. You can do a lot of automation, and you can check out some of Nicole van der Hoeven's videos, who among other things use it to keep track of TTRPG campaigns, both as a player and as a game master. For example this one.
I don't use their sync service, but have all files locally on my Nextcloud server. I sync them to my phone with Syncthing, which unfortunately means I cannot encrypt them with Cryptomator like I planned, but if you only use it on your computer, that is also something you could do. If you are paranoid about them still phoning home with your data, then you can block its network access with a firewall. I think you can install plugins manually.
I would have preferred it if it was FOSS. I have considered checking out Logseq as an alternative. But the bullet-based workflow doesn't appeal to me, so I haven't tried yet. I switched over from Standard Notes, and honestly it was pain to transfer because the text export from Standard Notes was all over the place, as I had used a lot of different note types. I tried to parse some of these smart notes they have, but I couldn't quickly figure out how they were structured to automate it, so I ended up manually going through and copying over what I wanted to keep. I like the approach of keeping plain text markdown files. It is easier to export to another application in the future, although some of the content will be useless as it is explicitly written for the plugins (e.g. Dataview).