Something like this? It's painfully slow though with spawning so many shells. Takes about 12 seconds on a Pixel.
```sh
find /sys/* -depth -type d -execdir sh -c 'mountpoint -q "{}" && umount "{}"' \;
```