We're flying to Dublin from the US next month, with a transfer at Heathrow -- with Brexit, do we need to clear customs and immigration both at Heathrow and again at Dublin?
Brexit has little effect here. You will clear immigration in Heathrow following the posted transfer route (don't go to arrivals) and then security. You will clear immigration again in arrival in Dublin (a facet arising from how each country treats the Common Travel Area somewhat differently not Brexit). If your bags are being checked through then they clear customs in Dublin.
This has nothing to do with Brexit.
This website will give you step by step instructions:
If you are returning via Heathrow, there is no immigration when flying from Ireland to the UK.