You should be able to do it either way. The nice thing about extending is that, for the most part, you can leave what you like as-is, and change what you don't like (with some exceptions). For example, if you like how most of TileEntityChest works, but not how it handles a certain method, you can override just that method (if you have access to it).
That aside, you could *instead* extend a more basic class, such as TileEntity, and would have to write code yourself for anything you want but it doesn't have. Going with that same logic, you could, in many cases, write a class completely from scratch without extending anything.
What it comes down to in most cases is finding the class which most closely reflects what you want to accomplish, extending or copying it, and then editing.
I can't give an authoritative answer on what's best in your case in the long run, but at a minimum you will need to extend TileEntity. TileEntity or one of its subclasses, because the AnvilChunkLoader only calls the readFromNBT() and writeToNBT() methods for TileEntity instances (including any instance of an object which extends TileEntity).
I suppose if I were in your shoes, I would copy the entirety of the EntityTileChest class as-is, rename it, and edit as necessary. The field used for storage in TileEntityChest is set to private access, so you won't have direct access to it if you extend TileEntityChest, which in turn means you probably won't be able to use TileEntityChest's built-in NBT methods as they are, but you can certainly use them for reference to see how they do things.
All in all, if the only feature you don't have working it disk save/load, then just keep what you have now, copy/paste TileEntityChest's two NBT methods in, and then edit them (you can copy it straight out of my previous post, in the spoiler).
Again, I haven't actually made a container myself, I'm just going off of what I see in the vanilla code and what I know about how MC handles data in general, so I can't really get any more detailed than this atm, though I'm sure someone else could (someone who has done it). You could also try to find a mod on curseforge which adds a container and is open-source, and take a peek at their code for an example.
Edit: Forgot to answer your last question about !this.checkLootAndWrite.
First, just to be clear, the method itself is checkLootAndWrite(). The exclamation mark is negation, which means if !checkLootAndWrite() is true, then checkLootAndWrite() is false. And the "this." part just means that we're calling it from "this instance", which in most cases is redundant, but can sometimes prevent confusion and errors involving fields/methods with the same name from other classes/instances.
And yes, you could extend TileEntity and write that method from scratch...*OR* you could extend TileEntityChest and overwrite that method, which would replace its functionality. In this *particular* case the result would be the same, because that *particular* method is only called from TileEntityChest and its subclasses (not from any of its superclasses, and not from any other external classes). In intelliJ, you can see where a method is called from (or just in general, what connects to what) by middle clicking it or by setting the typing cursor on it and pressing ctrl+B
But yeah, maybe someone else can give you a more specific answer, or check out some repository code of an open-source mod with a working container