Is this a safe way to measure mains power on an oscilloscope?
That looks like a good safe project to me. You might consider checking the voltage between the 9.9 V terminals and earth. You will probably find some random voltage perhaps even 115 volts. Connect a 115 volt light incandescent bulb between the 9.9 V terminal and earth. With that connection, the voltage across the bulb should drop to nearly zero. That should demonstrate that there is some small leakage current through the transformer due to capacitance between the primary and secondary winding.