So one angle where I think reading homestuck helps explain a bit of UT/DR is in the ways their authors slip into the story. Some spoilers for both herein.
In homestuck obviously Andrew Hussie has a self-insert character, who's a vengeful goofball that exists to nudge the story around and lampshade a few deus ex machina moments. The trick here is understanding that this isn't really AH's only way to directly access the story.
Between author commentary and a bit of reading between the lines, a common (and imo, correct) take is that Doc Scratch is also a Hussie-insert. He places himself in an authorial position in the story, "omniscient" except for some dark pockets left for him to fill in as he needs, able to perfectly dictate how events will go, manipulating events to his master's ends. Said master is, notably, another authorial insert whose existence is the canonical impetus for the whole story.
Where insert-AH is the mask Hussie puts on for goofy or minor adjustments, sometimes they need to change things more dramatically or maliciously, or in a way that otherwise needs to be a step removed from "because the author said so", so he puts on the Scratch mask and makes the adjustment there. This isn't "canon" in a watsonian sense - hell, AH is the one who ultimately KILLS scratch - but it is more true from the doylist, "why is the story written this way" sense.
Taking this to UTDR, I can't help but get the feeling that Toby (whose involvement in homestuck and Hussie's basement are well known) was particularly influenced by this writing style.
We all know the annoying dog, who functionally serves the same role as AH - show up as a goofy deus ex, move the plot along, crack some jokes, etc.
The trick here is that whenever I see anything relating to Gaster (or whoever the mysterious voice from the intro sequence is; I'll refer to them as Gaster here since common consensus is "yeah that's probably him") feels much the same as Doc Scratch in a narrative sense. He's a mysterious, seemingly meta-aware puppeteer who appears only to deus-ex the plot forward or set its inciting events in motion, who tries to work quietly in the "blank space" of the work.
Why does Gaster voice apparent support of the player in the knight fight? Because Toby wants you to do so, but the Annoying Dog isn't the right mask to tell you that, it would screw up the tone of the sequence.
Why is it "his" Deltarune? Why does he care "how much longer it will be"? Because it is in fact Toby's story, and he is in fact invested in both telling it and seeing/experiencing the way people engage with it.
Whatever the in-universe story is, it doesn't matter - and in fact shouldn't matter. I think a lot of people are priming themselves for disappointment by looking for answers about how the mysterious Dr. Gaster fits into the story, when the point of him is to be one step removed for the author to personally insert himself into that story. More than likely, he'll remain mysterious with only vague hints and bits and pieces of lore available, because any definitive answer would weaken the story.
"Gaster is like this because of specific dark magic reasons and he's just in this to do some ritual or make drama" -> kills the mystery and shrinks the scope of the story. Makes him stop being a conduit to the author and start being a (frankly shallow) character
"Gaster is literally the author" -> says out loud something that explicitly shouldn't be because it would make the already-visible hand of the author too jarring and cheapen the narrative.
Leaving him in this sort of mythical half-understood place, where he maybe leaves us with "THANK YOU FOR PLAYING, MY DELTARUNE" or something, is the goldilocks zone that I think he needs to stay in
TL;DR: Andrew Hussie's self-insert in homestuck is to Annoying Dog as Doc Scratch is to Gaster.