I buy a 3 lb can of cheap coffee, then spray a mixture of 50% bleach and 50% water around the trailer after spreading the coffee on the floor. Then have the trailer washed out. Not so much with onion loads, but with inedable pet food frozen loads made of animal biproducts.
Be extra careful about hauling any dairy products after a load of garlic or onions, especially butter. It will absorb odors. Not bad if you want garlic butter, but...
I hauled a load of peppermint oil one time. I thought it smelled pretty good afterward, but the next shipper refused the trailer, because of the smell.