Flexoelectric engineering of van der Waals ferroelectric CuInP2S6