Where rules fail let logic prevail
Let's take a good look at the rules involved first, then we can use logic to intuit what to do with large creatures in difficult terrain.
The Rules say:
You move at half speed in difficult terrain—moving 1 foot in difficult
terrain costs 2 feet of speed
Types of Difficult Terrain:
dense forests, deep swamps, rubble-filled ruins, steep mountains, and
ice-covered ground—[are] all considered difficult terrain
The DMG adds webs(p105) and climbing on a larger creature(p.271) to this list. Also of note are ball bearings and caltrops (PHB , which do not create difficult terrain per se, but moving through a square full of either one at half movement (as if treating it as difficult terrain) negates the other effect of the these hazards.
Then, there are spells that make an area into difficult terrain, but since there are a lot of these and they mainly mimic one of the aforementioned effects, I won't address them specifically.
Dense Forests: are hard to push through, cause you to have to weave around, snag on your clothes, etc.
Deep Swamps: are hard to push through, cause you to have to weave around, your feet get stuck in mud, etc.
Rubble-filled Ruins: cause you to have to weave around, may shift under your weight, etc.
Steep Mountains: require more energy to traverse, may cause you to have to backtrack or climb vertically, could trigger rockslides, etc.
Ice-covered Ground: walking slower helps you to avoid slipping and falling.
Webs: taking care by moving slowly helps you to not become stuck and restrained by the web.
Climbing on Larger Creatures: the constantly shifting, unpredictable surface hampers movement.
Ball Bearings and Caltrops: taking care by moving slowly lets you avoid stepping on something that you wish to avoid.
Some of these examples reduce movement because the creature moving has to be careful of a hazard (Rubble-filled Ruins, Ice, Webs, Ball Bearings and Caltrops), others reduce movement by actively impeding progress (Dense Forests and Deep Swamps), and others because traversing the terrain is physically more demanding (Deep Swamps and Steep Mountains).
What about Large Creatures
The most important thing to consider when handling a large creature moving through difficult terrain are:
Is the terrain still difficult at that size?
Normal stairs would be difficult for a Tiny creature, but wouldn't be for a Small or larger creature, similarly, some steep surfaces may not present a problem for a creature large enough to simply step up to the next level. Similarly, tall grass may seem like a Dense Forest to a Tiny creature, and a Dense Forest may seem like no more than tall grass to a sufficiently large creature. The depth of a swamp is also relative to the size of the creature traversing it.
Things like slipperiness and avoiding hazards would still be a problem for most creatures, no matter how big they are.
How does the large creature move?
Is the size of the Hazard small enough for the large creature to simply bypass by stepping over it? If they don't notice it, would it potentially still impede their movement, such as making them slip or get stuck? In such a case, where it would, where are the creature's feet? For a bipedal creature, such as a troll, ogre, or giant, I would assume that their feet are near the center of the spot they occupy and treat them as triggering the hazardous terrain while the center of their space is within the effected area. For a quadruped, I would assume that their feet were at the corners of the square, and for a creature that slithers or has many legs, then they may either trigger the effect in their whole area they occupy, or negate it entirely, depending on the situation.
Another good way to handle this is to roll Percentile Dice and if the number rolled is less than the percent of the creature's squares that occupy the hazardous terrain, then they treat it as difficult terrain, otherwise they don't.
This is the better way to do it when logic does not strictly suggest another solution.