Hi CMPX, thanks for reaching out is.
With regard to your topic I recommend to have a look at how the Lattice Plane example on Github works.
This is a simplified example showing how to deliver the mechanism of the Lattice Deformer on a plane and, at the same time, it put the bases to extend it with an arbitrary mesh.
Definitively your mesh modifier should implement the ObjectData::ModifyObject() method to displace the mesh of the object to be deformed based on the displacement that you've set on the controlling mesh.
If your controlling mesh(es) are then Cinema 4D generators, then you have to run through BaseObject::GetCache() or BaseObject::GetDeformCache() in order to retrieve the points of the controlling object, and based on their relative position in the space deliver the modification on the target object.
Best, Riccardo