I have a living will to state that if I ever develop dementia, or any other condition where I am no longer able to care for myself and speak for myself, I do NOT want any life prolonging interventions whether surgical or medical - with exceptions for anything like fractures.
I have seen an awful lot of dementia and care homes during the past 20 years or so (2 close relatives with it) and what worries me (from experience) is that by the time you are showing early signs, you may not realise that there is anything wrong, or even if you do, you will repeatedly forget. And if you did have a stash of pills hidden away, you would very likely have forgotten where you put them, not to mention that you had ever intended to take them at all.
Seems to me that far too many very elderly people with dementia are kept alive too long - stuffed every day with pills for this or that to keep them 'healthy' - for what?? - in and out of hospital, on drips and antibiotics over and over - because of the mindset that nobody can be allowed to die if it's at all possible to prevent it.
If a person with dementia is perfectly happy and contented, that is one thing, but from all I've seen over many years, so many are not. They are often endlessly anxious or confused or fretting about things nobody can do anything about - e.g. the poor lady of over 80 at my mother's care home who was crying and so distressed that her mother didn't know where she was - she had to get home NOW. Staff were incredibly kind, but nothing could comfort her.