Is there a way to look at what opponents you have played the most on lichess?
Yes:
Profile-> Favorite Opponents
It is for last 1000 games only. Is there a way to get overall details ?
If there were overall details, it would need more data. For example, german11 would need 2562,61 times more data to store favorite opponents without that limit.