My kune kune weaners get wormed when I rehome them at 8 weeks, and the biggest are Jack Russell sized! This litter the two largest were 10.6 and 8.6 kg.
They need less than 1ml of wormer injecting so need a syringe that can measure small amounts, but there is no reason they cannot be wormed.
Either your vet doesn't know much about pigs, or they haven't understood what the issues are.
As a vet, I'd say a 5 month old weaner of that size (especially of a crossbreed that should be a bit larger) either has worms slowing his growth, or other internal issues, at which point he will be weaker and less able to cope with any worms! Therefore it is even more important that he gets wormed.
There are plenty drugs available for worming pigs, in our practice we usually have an injectable ivermectin drug on the shelf from which we can dispense small amounts of wormer to people with a few sheep, pigs or cattle that need treatment.
Speak to your vet again (who may need to see the pigs before dispensing wormer) or consider looking for one that can treat pigs.