To "remove" the perspective in the picture, hugin
seems to work. Use the advanced interface to mark the horizontal and vertical lines and change the projection type to rectilinear
hugin
can then output a resampled version of the photo usable in blender.

In a fresh blender scene, convert your camera from Perspective to Orthographic, and clear out its rotation (alt-r) and set the position to [0,0,20]
(just someplace high on the Z axis will do).

Set the Background Image of your camera to be the undistorted image.

You also need to adjust your scene Output Properties resolution x and y to match the image, otherwise the pixels will be rectangular instead of square and your image will be distorted.
If matching the size of the physical object is important (it is to me) then create a cube or plane that matches the size of an object in the scene. Since my photograph includes a grid of 1-inch squares I set my Scene Properties > Units to Imperial Inches and created a 1-inch cube.
I then adjusted the camera's orthographic scale until the 1-inch blender cube matched a 1-inch square in the camera's background image.
At this point you should be ready to create an object to trace the curve. I started by making a Bezier Curve.

I converted the curve into a mesh and extruded it to create a 3-d printable object I can use to compare against the original object.
