Org roam could work if you’re your cool with emacs. Create files on the fly that are named with the date/topic and it could be setup to allow timestamps since you mentioned that. Notes can be linked to each other or easily merge or split as it develops.
Also org roam comes coupled with a daily diary that attaches to emacs calendar system.
I think you would be better off using something like org-roam. It’s all text so script can still be used and it can be searched fast with ripgrep. Also org mode has loads of features that a homegrown system will never be able to catch up with