You cannot have closed, isolating and ventilated ear cups at the same time.
K271 and other "closed" headphone have a closed chamber behind the driver. K240 and other "open" headphones have open space behind the driver, but still the earpad prevents the acoustical shortcut. The driver seals the earcup. They leak sound, but no air. As such the ears under earpad and driver are not ventilated.
I prefer velour earpads over (p)leather or foam, but under hot weather that still is no hygienic and comfortable solution. For some headphone you can get disposable "sanitary" earpads or covers.
The only way out is either IEM (no sweat in ear canal, but some do not like IEM at all) or K1000 (no isolation, leaks sound a lot, limited numbers and only second hand).