Since you're a programmer and value customisability & open-source, have you thought about trying emacs org-mode?
I was also in a similar position trying to decide between TiddlyWiki, Notion, Evernote, OneNote, Confluence, etc, for a personal knowledge base, but eventually settled on org-mode. Lots of people use it for managing TODOs, planning, and organising things, but I use it as a personal knowledge base.
org-mode out of the box supports hierarchical note taking with headings and links to other files or headings. You can also use org-roam (https://github.com/org-roam/org-roam) to get something like a Roam or Zettelkasten workflow (with backlinks etc) without having to use separate software (since you said "I plan on keeping a personal wiki and then taking out core ideas from them into my zattlekasten" maybe you will find this useful). If your notes include references/links to academic papers, then you'll love org-ref (bibtex integration).
If you're interested, I'd recommend having a play about with vanilla emacs and the Doom Emacs configuration (https://github.com/hlissner/doom-emacs).
It's definitely more work to set up than Notion, but much more customisable and you're in full control of your data (and can store everything under version control!). I've not used TiddlyWiki enough to form a useful opinion though.