A small tear-gas canister injected into the wheel well might discourage people from climbing in, if that was the atmosphere inside. Obviously it relies on the fact that most of it stays in there until the doors open for the gear to be raised, otherwise the ground crew wouldn't be able to do their job. At the very least, if you assume that the stowaway is effectively dead when he climbs in, he probably wouldn't be able to hold on as the doors open and would be left near the departure point rather than potentially being dropped on approach to the destination.