Let's say I have some USB stick that I know and trust. I can examine
the firmware and generate a checksum for it.
Can I use this checksum to ensure that when the USB is next plugged in
the firmware was not modified? Would it be possible to do this before
and firmware ran?
I don't see why not. Since you already have some method to examine the firmware (apparently), why not just examine the firmware again when it is next plugged in, take the checksum, and compare to the known good checksum...
This seems obvious, so maybe that this is not what you are asking about. However, if this is not what you are asking then your question is not clear to me...