yeah, i've done it before on a caterpillar 320d excavator. i'ts a bit tight but not too bad-just clean the area first, unplug the connector, and back the sensor out carefully. also check the wiring harness since sometimes the problem is the wire, not the sensor.
you might also find parts or machine listings through rb global marketplaces or sites like boom & bucket if you're comparing parts or machines.