Hi,
I confirm the pin compatibility, we internaly use sockets on MB1263C (STM32MP157C-EV1 Eval board) to allo testing other references.
Note that for the sake of SW usage, some OTP are burnt (to know which ST board it is, to define the MAC address), so changing the device imply some SW tuning.
For HW point of view, it is certainly possible to replace the component, but unsoldering/resoldering a pitch 0.5 device without deterioration of PCB and side components is matter of specialist.
What is the purpose of replacing with STM32MP151 ? With minor SW adaptation (e.g. not using 2nd Cortex-A7 core and peripherals not available on MP151x), you could probably being able to use the STM32MP157A you already have as a STM32MP151A.
Another solution is trying to find a 3rd party SOM maker with the STM32MP15xx device you need.
Regards.