Automatic control via Preisach hysteresis of a filtration model with capillarity