All PhysX specific code is wrapped with an ifdef WITH_PHYSX which you can of course turn off.
We try to maintain an abstraction layer wherever possible. FBodyInstance and FPhysScene are the two objects you’d want to start looking at. Most common functionality should be fairly easy to swap (AddForce, SetLinearVelocity etc…). These are easier to swap because most physics engines have a very similar API so it should require little reworking. Things like destruction and cloth are more difficult because they’re more tightly coupled with APEX and unless your physics engine has a very similar design it may require more work.
A big concern would be on upgrading source code in the future. If you’re making modification in these engine source files upgrading engine versions will of course be more difficult.
If you decide to do this and find that certain refactors are needed it would be great to submit a pull request so that upgrading future releases is as easy as possible.
Hope that helps