Since you have two phones available both running GrapheneOS, one with smashed screen and one without, i suggest the following:
You do the steps I gave to factory reset on your device without the smashed screen. At each step replicate the exact same action in the device with the smashed screen. The first phone is just used for reference so you can see what you are doing on the second.
When you get to the final step of wiping the data perform only on the device with the smashed screen.
Et voilà !