I had a similar route on the stocks and have adapted it for you: 383km + 5071m. Could cut out at least 1000m and 100km.
https://ridewithgps.com/routes/34996187?beta=false
Holyhead, Caernarfon, Snowdonia, Harlech, Barmouth bridge, Tywyn, Borth, Aberystwyth, Aberaeron, New Quay, Aberporth, Cardigan, Nevern, Presselis, Porthgain, Abereiddy, St David's, around St Bride's Bay to Little Haven, Johnston and down cycle track, Neyland bridge, Pembroke
View attachment 568274
I have ridden about 2/3 of these roads.
Google Walking (shortest)
Look forward to hearing how you get on, once we are closer to 'normal' and cyclists have access to Wales.
Commentary: B roads across Anglesey, cycletrack to Caernarfon (castle), into/over Snowdonia (option with good cyclepath to go 'round (// A487)), Harlech castle, Barmouth footbridge, Aber Dsynni footbridge, Cwm Maethlon valley east to Machynlleth, A4876 but cut west to Borth, cycletrack across and up the Ystwyth, after New Quay (optional but OP did say coast and towns

), option to go via Newcastle Emlyn rather than Cardigan, NB Nevern Crosses, Mynydd Preseli not to be missed, (whereas Fishguard is), visits to Porthgain and Abereiddy optional but recommended, same for St David's cathedral, St Bride's Bay havens/bays from Solva and Newgale south to Little Haven, ESE to pick up Westfield Pill (Neyland) railway track at Johnston.