I think you should merge the quality_affects_capacity to all fluid storage like StorageTankPrototype too and also add function to access the runtime :
LuaEntityPrototype::get_fluid_capacity(Quality?) to be able to read the exact value of a fluid wagon with quality because right now there is absolutely no way of knowing the actual size of it beside doing some dark magic