Strava has this feature in the route planning tool.
In the header, you can see it has toggle switches for **popularity** (pretty nifty if the area is new to you), **min-elevation** (what you're looking for), and **manual**.
!enter image description here
Here is an example of how it works. The below route is between two points in Palos Verde, CA - a notoriously hilly (fun) area.
**Min Elevation OFF:** !enter image description here
**Min Elevation ON:** Here's the route with the same end points and the feature turned on -- a savings of 348 feet of elevation gain, but an extra 2.5 miles of riding. !enter image description here