I can remember seeing WWII cartoons decrying hoarding. I don’t know if any were prosecuted then.
During WWII, Victory Gardens were encouraged. But we are living in a different world these days.