I think what you want might be a secret gist:
Secret gists don't show up in Discover and are not searchable. Use
them to jot down an idea that came to you in a dream, create a to-do
list, or prepare some code or prose that's not ready to be shared with
You can create as many secret gists as you like.
Warning: Secret gists aren't private. If you send the URL of a secret
gist to a friend, they'll be able to see it. However, if someone you
don't know discovers the URL, they'll also be able to see your gist.
If you need to keep your code away from prying eyes, you may want to
create a private repository instead.
Although you can, as suggested, also create a private repository, for a nominal fee. This sounds very like git, which is the software behind github, which is used for gists.
While it is generally used for software, it can be used for writing a book, or a shopping list. The software, git, keeps a copy of every single version; it's Version Control Software. So that if every revision you make is kept, and you can always fork and branch from different ideas.
If you're writing a book, you might have different branches where a character is killed off early, or not. Some of those branches might be dead ends, or not. Some branches might introduce new characters. you can checkout different branches, or merge branches. While it can get technical, sites such as github offer low-pain interfaces.
A gist is probably the simplest notion of this. It might be worthwhile to pay to keep the data private. Or, if you want it public, it's a great way to write a book!
You can control who has edit access, as with google docs. It's very like google docs in that respect, with additional controls. Again, if it's confidential data, you can pay a host, such as github, or others, so that only those with the key have access. A high level of security is possible this way.
There's nothing stopping you from running a git server yourself, for ultimate security. However, that could be daunting (or not). Other stack exchange sites can help with setup, such as super user.