Certainly an interesting option, if the station/planet itself enforced the cargo scan if you got there before the fleet got to you. They obviously already know you're due for one after all, since the fleet in question radio'd ahead to let them know not to admit you until the scan was finished. In that case, I suppose the player would be forced to pay whatever fine/bribe or have any illegal cargo confiscated - since it's not just a fleet that the player could choose to fight instead of allowing the scan.
Of course, other options in the mean time are to either:
1) join the fleet in battle to help it along so that it can scan you without to many more in-game days passing, and deploy just enough ships to make sure the fighting is still even; or
2) make sure you have your transponder on when doing legitimate trading, and only buy/sell from/to the black market on non-pirate planets *after* doing all your legitimate trading in that system.