I don't know anything about this myself. (I'm already old. As far as I know I don't have any dementia.) I no longer take any psych med's or any other medications either for that matter. My impression is that there are potential long-term risks with almost every drug both psych & otherwise.
I think the best one can do is to weigh the long-term risks along with the short-term benefits & make as educated a judgement as possible. Clearly, it seems to me, one is better off not taking any drugs if possible. But if you need them, you need them. That's not really much help I know. But it's what occurs to me with regard to your post.