Macro photography is a game of millimeters. When you are shooting at 1:1 magnification, the depth of field is so thin that even the slightest movement or a poorly calibrated viewfinder can ruin a shot.
The Nikon D300, while a solid workhorse even more than a decade and a half later, lacks the modern "Focus Peaking" found in mirrorless cameras. However, with a Linux machine, some open-source tools, and a custom Python script, we can give legacy liveview enabled DSLR real-time focus assistance.