You are doing the best that you could at any given time with the resources you have available.
He couldn't figure out how to flush the toilet but mentally knew it was supposed to be clean when you leave, so he'd take his poop from the toilet, wrap it in paper and throw it in the trash. Dementia is horrible.