Nope sorry, gerbils, rabbits, and others require way less than a dog. A dog is a pretty high maintenance animal. Most need one on one attention and long walks, etc. A guinea pig does not. Even when you let them out for exercise they are basically self-exercising.
You say the dog and guinea pig would be equally unhappy confined. I disagree. Dogs are flat out more intelligent and of course that affects their stimulation requirements. When animals are stressed/bored/chronically unhappy they tend to develop stereotypies. I know I've caged rabbits for longer than 24 hours and the rabbits show 0 signs of distress. When you let them out in the pen they act normally. Put my dog in a cage of equivalent size for 24 hours and I promise you he'd be going insane. Let him out and he'd be even more insane.
Parrots self mutilate, horses crib, rats chew bars, leopards pace etc. Go look at videos of foxes and mink at fur farms and the animals are neurotic. Then go look at videos of rabbits farms and see if you can identify any stereotypies or anything at all that indicates stress from confinement. Though you probably wouldn't see it but I imagine some would chew or pull at bars. But nothing like the incessant pacing, self mutilating or neurosis you see in the aforementioned animals. I do think all animals have a threshold for when they become uncomfortable due to boredom or confinement. But I think some animals e.g. dogs have a much lower threshold than other animals.