I'll start off by saying I have no clue how to implement this just a suggestion
So the problem I see all the time is the top layers will obviously print whatever the shape of the top layers without taking into consideration what is underneath. Say using cubic, you could have multiple curves printed in thin air and all that does is cause a mess.
What I was thinking was do a zigzag/lines pattern that would fully fill the infill pattern under where the top would normally be printing in thin air, but only where necessary as shown below
Maybe call it conform to infill, or whatever