Here are the catalog excerpts from Michel 2020.
The red one is an Official D. According to Michel, Official D stamps were for confidential official mail. They were canceled using a date stamp or ZKD machine cancel.
The green one is an Official E. Official E stamps were for shipments with delivery receipts. They were also canceled with a date stamp or ZKD machine cancel.
WRT the "ZKD 4a" and "ZKD 4b", Michel says roughly this — stamps with value overprinted with a square and ZKD 4a/4b were used as replacement stamps for rejected, repackaged items.