You will need to go through customs at FRA as that's your point of entrance into the EU. You don't go through customs at BAR as within the EU there is a freedom to travel (both for persons and goods) within the EU and you've been screened within the EU at FRA already. So basically you do customs twice (US and FRA)
Back; twice customs. Once at BAR as a start and second check at FRA as part of flying outside of the EU (checks for USA-destined fligths tend to be heightened anyway).
You will need the transfer time. Forget the construction mentioned or any Islanding vulcano having PMS-troubles or not, FRA is a large airport that isn't always that....... quick. For instance, at FRA some flights still arrive and/or depart at gates that do not use a jetway. Read; add quite some time extra for using bustransportation from terminal to plane and vice versa. While the shorter flights run a bigger risk of this happening to them, the transatlantic aint "safe" from it either. Which flights this will affect is not know until very last minute, can be even a last second change.
Depending on the precise gates your assigned it can be a very long travel to get from one flight to the other, esp. since you're moving from "non EU-screened" to "EU screened" area.
Don't sweat it, that won't help you now. An hour and 40 minutes could be enough, it could be too short. You don't know for sure until you arrive at FRA. If you were to unfortunately miss your flight; the airline is responsible for getting you to Barcelona, assuming you booked a through-ticket and not booked 2 seperate tickets on your own. If you do miss the flight; it's easier to get onto another flight the same day to Barca as it would be to your destined airport in Canada. If that is any good news?
But really; don't worry about it now, you're booked and that's it.