It’s a pretty easy problem to solve, give them a bottle or sucking snack just before takeoff and landing, and keep them tired so they sleep most of the way. We’ve traveled with babies and it’s really not an issue most of the time.
Then again, we had to deal with two blowouts (huge poops that escape the diaper) on the same flight, so there certainly are hiccups you can’t plan for. But most of our trips with babies have been pretty okay.