Is it possible to connect a 230 V pump to 400 V electrical mains, e.g. during pump replacement?

Yes, that is possible. To do so, connect one phase and the neutral conductor. The voltage between phase and neutral is 230 V.

If there is no neutral conductor, a new cable must be routed. Such work must only be performed by a qualified electrician.