For the potatoes: Generously butter two 4-quart baking dishes.
Bring a large pot of water to a simmer and add the potatoes. Bring to a boil and cook until fork-tender, 20 to 25 minutes.
For the shallots: Meanwhile, add the oil to a large skillet set over medium heat. When the oil is hot, add the shallots in batches and fry until golden brown, 30 seconds to 1 minute per batch. Remove with a slotted spoon and drain on paper towels.
Preheat the oven to 350 degrees F.
Drain the potatoes in a large colander. Put them back in the dry pot and put the pot back on the stove. Mash the potatoes over low heat, allowing all the steam to escape before adding the other ingredients. Turn off the heat and add 3 sticks butter, the cream cheese, heavy cream, salt and pepper. Mash to combine.
Spread the shallots in the bottom of one of the buttered dishes, reserving a few for decorating the top. Scoop half the potatoes on top of the shallots and spread out. Arrange the reserved shallots on top. Scoop the rest of the potatoes into the second dish. (If you are making these ahead, cover and refrigerate the dishes at this stage.)
To cook, throw pats of the remaining 1 stick butter over the top of the potatoes and bake until the butter is melted and the potatoes are warmed through, 20 to 30 minutes. (It will need 1 hour if coming from the fridge.)