When I build preCICE, it uses the default MPI implementation. How could I use e.g. MPICH?
preCICE uses the CMake module FindMPI.
Thus, you can simply set the CMake variable
MPI_CXX_COMPILER
to the compiler wrapper.
This requires you to reconfigure a new preCICE build as it changes cached variables.