So as we know adult wild hoglins attack you even if you try and breed them and I like that. But what if you made their behavior like foxes when it comes to breeding. If you are able to capture some hoglins and successfully breed them the babies should be less aggressive towards the player.
But to make it more tricky you have to remove the parents/wild hoglins from the babies or the babies will “learn” to attack the player from them. But once the “tame” babies grow up they won’t attack the player making it less deadly to farm them if someone is brave enough to do so.
Once they’re tame to make it worth it for the player to farm, just like how humans tamed wild hogs into farmable fatter pigs. After a few generations of these tamed hoglins are bred they should get “fatter” or slower and therefore drop more pork chops and leather once killed, but this should obviously be capped after a certain amount of generations.