I don't believe this would add.. any performance hit at all, actually? Your on_tick function only checks vehicles that have been added to the list from AutoGun.vehicles, which only adds vehicles which are listed under the VehicleTypes ("car" and "spider-vehicle" being the only valid types anyways).
Both "car" and "spider-vehicle" entities appear to use "defines.inventory.car_trunk" as their inventory, so the check for "defines.inventory.cargo_wagon" would simply never occur (because that's how lua works, only the first valid parameter of an or statement is checked). The only time "defines.inventory.cargo_wagon" would ever be checked, is if a vehicle in the list does not have a "defines.inventory.car_trunk", which would only ever happen if the vehicle is a cargo-wagon.
Therefore, zero performance hit on_tick
I don't understand what you mean by the "data-final-fixes" part, since your mod doesn't have one of those, and you don't need to add one to make this work. If you wanted to avoid adding unnecessary types to the list of AutoGun.vehicles, then you could add a simple check for my mod (and its train grid setting), and only if true, add "cargo-wagon" to the list of VehicleTypes. Not to sound presumptuous, but there are no other vehicle equipment mods on the mod portal (yet), so no other checks should be necessary.
Either way, I would like to request for this functionality to be included. You can test it for performance if you want, but I don't believe there should be any performance hit.