A small padlock through the chainwheel around the chain, perhaps?

(I'd probably choose a different lock; this is just one I had on my workbench. Hmm. And perhaps orient the lock inside rather than outside. Hmm.)
Note: the rear wheel can still freewheel and the bike can still roll forwards.
That looks like it would be effective.
Do you think it would do any damage if you tried to ride on it?
It could hurt the derailleur if you pedaled backwards. But peddling forwards I'm thinking at most it might scratch up the inside of the chrainring, as in the ridge on the opposite side of the teeth, as in no big deal.
If you could combine that with a method to keep it from going backwards into the derailleur you might have something
For fixes and SRAM set ups with a single gear up front this might be a great out of the box solution