The XML dumps are the most compact and sustainable format in the mid term (let's say decades).
https://meta.wikimedia.org/wiki/Mirroring_Wikimedia_project_...
ZIM might be able to survive longer (centuries?) as probably the future will still need some HTML parser, while wikitext parsers or PHP might be long dead, who knows.