A team has had all 5 runs came on home runs 3 times since 1897, most recently Toronto Blue Jays on 5 June 2016. That is about one every 147,668 team-games.
Box score for the most recent one ↗
The whole distribution — All Runs on Home Runs · All 18 shapes