I'm not aware of a source for STL files or engineering diagrams, but you can do the measurements yourself fairly easily. I did this to make credit-card-slot cases for my Moto G4 and the fit turned out very good.
Start with a digital caliper and measure the maximum length, width, and depth of the phone, ignoring rounded corners. Next, trace the phone on a piece of paper and use a straightedge to extend the flat parts of the sides to a bounding rectangle, and measure how far from the corner the curved part extends in each direction before meeting the flat part. Finally, if the sides of the phone are rounded too, estimate how thick the phone would be if you extended the curved edge to a full semicircle.
At this point, you can approximate the shape of the phone as the convex hull of 4 spheres scaled appropriately in the x, y, and z directions, if the sides are curved, or the convex hull of 4 cylinders scaled in just the x and y directions, if the sides are flat. In the former (spheres) case, the approximation will be thicker than the phone, and you have to slice off the top and bottom to match the arc segment that's actually present on the sides of the phone. There are ways to do this exactly but I found it doesn't need to be precise and you can just eyeball it.
In order to make a usable case, you'll also need to measure the distances of camera lens, buttons you want to expose, etc. from reference points. This is straightforward with a caliper.
Here's my result, following this procedure:
