The lag is mostly delay in the network traffic. Setting up the microscope on its own network infrastructure should help to avoid other traffic getting in the way. If you are using a computer near the microscope, the simplest way is to connect using a cable rather than WiFi - you may need a USB ethernet adapter. You can also set up the Pi as a WiFi host instead of connecting it as a client on your main network and then you can connect your computer to that hotspot. This is covered in Using rasp-ap to turn OFM into an access point - General - OpenFlexure Forum.
Both of these mean your Pi is not actually connected to the internet , so for updates etc you would need to re-connect to your main network.