It's fine, but be quick off the plane as you'll have to go through passport control. There are a few threads on here where people have cut it quite fine, but no one who's missed the flight as far as I recall.
You can check in on the BA app (using the BA PNR) and also get the staff to print your return BP at LHR before you head to DUB.
You'll get avios and TPs, no problem there.