If you are gong by train from Chester to Bath, you will probably be using the Marches line that goes down to Newport where you will change for a train to Bath. Newport is only 15 minutes from Cardiff = the Welsh capital and that would be the next stop if you were to stay on the same train from Chester. So, you may like to consider Cardiff for a couple of nights? Direct trains go from Cardiff to Bath hourly & the journey takes just over 1 hour.
Did you know that 4 castles can be found in & around the city?
https://www.cardiffcastle.com/the-castle/ is found in the centre and dates from Roman times. In the middle is a Norman keep (1087) but much of the castle dates from the 1800’s when it was owned by the Marquess of Bute.
CAERPHILLY CASTLE is a massive medieval fortress just a 20 minute local train ride north from Cardiff. The town of Caerphilly is a dump in an ex mining area but the castle is everything that you would expect of an 1100’s fortress complete with moat. If you are visiting Caerphilly, you might like to break the journey at Lisvane station and walk for 5 minutes across the car park and into CEFN-ONN-PARK (free & good pub/restaurant next to entrance). In spring it is very colourful with azaleas, camellias, rhododendrons and bluebells all under the canopy of a temperate rain forest. https://www.outdoorcardiff.com/parks/parc-cefn-onn/
https://cadw.gov.wales/visit/places-to-visit/caerphilly-castle
CASTELL COCH stands on a hillside in north Cardiff. If you have a car - it is M4 junction 32 and you could easily visit this castle and Caerphilly Castle in one go - or taxi between the 2. If visiting by bus from Cardiff - you need Stagecoach 132 and alight at Tongwynlais (about 25 minutes out). The walk from the bus stop to castle is about 17 minutes uphill.
https://cadw.gov.wales/visit/places-to-visit/castell-coch
ST.FAGANS CASTLE & MUSEUM OF WELSH LIFE is just to the west of the city. The site is vast and needs at least half a day. You have grounds with buildings of significance brought from all over Wales and re-erected. The Castle is really a 1500’s Manor House. You will also find gardens near the castle. You will also find indoor galleries explaining about life in Wales through the ages - handy if it starts to rain. https://museum.wales/stfagans/about/ (Cardiff Bus route 32 - no bus on Sundays ).
LLANDAFF CATHEDRAL is about 2 miles NW of Cardiff Castle.https://www.llandaffcathedral.org.uk
https://cardiffmuseum.com is a small museum about Cardiff in the centre of the city. THE NATIONAL MUSEUM OF WALES is found just N of the shopping area next to the City Hall. It has extensive art galleries.
The waterfront (known as CARDIFF BAY) is 1 mile south of the city centre.https://www.visitwales.com/destinations/south-wales/cardiff/top-things-see-and-do-cardiff-bay