Semi-sapients breed totally fine on a chain, neutral/wild trolls and troglodytes do so perfectly fine, so a giant with [SLOW_LEARNER] would be ok to breed in that fashion for a batallion of war giants. Specially if you could provide giant-sized (I even in my goblin modification gave giants [EVIL] in the hopes that gobbos might start sourcing giants from nearby caves) clothes and some clubbing weapons to make use of that enormous strength, but obviously not totally impervious as to when you eventually need to stop your giants (unless its a dead man's trigger)
Kill more megabeasts = spawn more giants, pity other-sentient eating doesn't work because giants sound like a excellent source of meat and bones gathered in this way.
Fun fact you can do the same with yeti's to have war-yeti's and artificially boost numbers in endless hunting cycles of creatures being captured = released off map as children and rehunted. Always when you're all set up on a tundra make good practice to capture yeti's, the butchery fur and meat is useful, the more yeti's you have on site the more that will breed (because child caps can only account the number of adults). Yeti's are animals with grasping hands and [EQUIP] so are predictable, just drop things around them and they'll pick it up in a dangerous situation rather than equip them with stuff (though a way to manuallly re-equip prisoners in a cage would be nice)
All animals sapient or not that are live birthed on the chain via forced methods will make a break for the map edges because their AI dictates that they don't miss their migration slot (not sure on megabeasts though because they dont wander back off and away) and because of marriage checks, they will likely not breed if fully sentient. Fully sentient semi-megabeasts don't like furniture that wasn't made from their little self inclusive 'entity' (though mounds have none, they are sort of a invader type think of it that way) so they'll sleep on the floor and are more likely to go insane. By all means try and go ahead putting down a small room and a bed for them it'd actually be interesting to see once they are on the chain.
(I've never had the luxury of trying out my methods on two live intelligent sexually compatible megabeasts)
Leaving the male in a cage adjacent to the female would be safer than them beating each other up, you can purposefully wall them in so they have forced exposure.
R+W+R
++CCW
R+W+R
Restraints (R) for beasts in range of a central male cage (C), on the opposite side you have walled (W) in restraints with 1 tile space of movement where they are always within 1 range of a cage and cut off with partitioning walls.
Whether you want to use 3 cages in the middle with partitioning walls or perhaps leave the 3 spaces free really depends on safety measures. Herbivores for example and non-aggressive non-raging animals like antelope/musk ox caught and 'wild bred' in this way are perfectly fine, and their offspring will try to escape through your cage traps that you should have put (If its not first terrified and fleeing, catching a baby megabeast given that its not being nurtured by its mother could be difficult if it breaks open your cages/restraints)
High quality metal/artifact chains are preferable for preventing intelligent tantrums, semi intelligents dont tantrum without traits and therefore can be downgraded, i would still recommend based on strength relying on metal chains for giants. A troll or a ogre in size and strength is really the limit pushing it as far as i'd apply a tethering rope.