I figure if they have artificial gravity then time dilation is something that they could have solved as well.
I'd expect that inertial dampeners, artificial gravity, deflectors, and tractor beams would all affect the process of time dilation to varying degrees.
But in my opinion, it's pointless to postulate exactly what the effects would be, unless you're going to go all the way and just invent the damn things. Beyond being pointless from a purely intellectual perspective, it would complicate the premises of Star Trek,
without making any counterbalancing worthwhile dramatic contribution.
In my view, that's why Star Trek
keeps it simple and generally avoids time dilation effects in the first place.
However, if I were to indulge in how I would handle extended STL acceleration of a connie in the Star Trek
universe, I'd do it this way.
1. Inertial dampeners couldn't compensate for time dilation indefinitely. Once the Lorentz factor gets to a certain value, the inertial dampeners would overheat, short out, and go off line, assuming they didn't catastrophically explode creating massive gravitational ripples that would tear the ship apart. At that point, if the ship survived, the crew would be subject to the inertial effects of acceleration, and therefore time dilation.
2. Therefore, to make a twin paradox trip, the connie would have to disable inertial dampeners to begin with.
3. Therefore, the presumably usual direction of acceleration is wrong relative to the deck layout. The proper direction of acceleration for such a trip would be bridge-first. Maybe the deflectors could be used to redirect thrust from the impulse drive to apply the impulse to the ship in the proper direction.
4. The continual operation of the shields would be essential to prevent blue-shifted cosmic rays from irradiating the crew to death.
5. Similarly, the navigational deflectors would have to be used to make sure the path ahead was clear of interstellar debris. But unfortunately, their emitters are mounted in the wrong place for the top-first journey.
All this adds up to the trip just not being something that the writers planned for, or if they did they really didn't think it through. The basic problem is that the decks should be laid out perpendicularly; the trope of laying the keel of the Enterprise as if she were a naval vessel seems to have won out over hard science fiction.