Extending engine plugin

I also faced a situation where I would need to extend already existed Engine module in Unreal in ideal scenario(avoid changing platform code). Did you manage to resolve your issue?

In my case I need to extend PBD physics solver from Chaos module. But there are a lot of dependencies which cannot be reached even if copy and paste the code in custom module.
I see only one reasonable way is to create a script which would substitude Engine files during build.