Hmmmm, I think that's something we could probably help with in dbplyr by providing something like `last_sql()` that would return the most recent SQL sent to the database. (By analogy to ggplot2::last_plot() and httr2::last_request()/last_response()).
I filed an issue so I don't forget about this: https://github.com/tidyverse/dbplyr/issues/1471