This suggestion is not a direct extension of the fast-replace-group feature, that already exists (you can fast replace for example identical types of belts). The behavior is only into one direction.
This post describes the problem why it doesn't make sense to have that always in two directions:
posting.php?mode=reply&f=6&t=33556#pr211131bobingabout wrote:Because, the way it works, you can also drop a MK1 assembling machine on top of a MK2. Therefor if you could drop medium poles on top of small poles, you could do the other way around too. Since medium poles have a longer range, that means plopping small poles on top could break the cables.
My idea about this is, that there are some rules in the entity configuration, that describe, how to replace the current entity with another. This is sometimes not so simple, cause the entities could have different size (see splitter). If there is a rule for the replaced entity, it could be also downgraded (of course) or have circular rules (Belt -> Splitter -> Underground Belt -> Belt)...
The rules can influence how the content of the entity is transfered into the other, how the orientation can change (e.g. replace Belt with Inserter), and some more (the implementation needs not to be complete in beginning).
Those types of rules are also useful for some kind of automatic upgrade, sometimes in the future.
viewtopic.php?f=67&t=4961 allow replacing belts with splitters
viewtopic.php?f=6&t=30482 "Upgrade" yellow belts to yellow-splitters
viewtopic.php?f=6&t=33556 Why aren't medium poles a drop in replacement for small ones
viewtopic.php?f=6&t=35513 Upgrade planner and automatic upgrades
viewtopic.php?f=6&t=28126 Upgrade Planner
viewtopic.php?f=6&t=29558 Get rid of different speed belts
viewtopic.php?f=6&t=29938 Easy upgrade of belts without R-R-R-R-R
viewtopic.php?f=6&t=32175 Electric Pole Upgrades.