First of all I wouldn’t feed any 5* heroes away if I don’t need the space. But if you need to eat some I think it most depends on your spending habits.
If you are f2p you should keep everything non S1 and even some duplicates of good S1 heroes. If you don’t get any new heroes leveling a third or fourth joon suddenly sounds not so bad.
C2p I would keep at least all event heroes they are hard to get, at least 2 hotm, s2 or S3 heroes, and maybe even more if they are good. But I would probably feed most of the duplicate S1 heroes only keeping some for the hero academy, you won’t bother with them and even if you should get a great costume you will also get another hero. There aren’t many costumes I would lvl more than two when I also have some S2, S3 or hotm waiting.
P2p you can feed away probably all S1 dupes and most hotm I wouldn’t keep more than two, most of the time you will have a ton of unique heroes waiting for mats, and there are only some heroes worth leveling more than one copy.
There is also only so many mats you can get. If you don’t pay extrem on mats or summon portals with chest, and don’t finish all the time top 100 or better in the events you will be able to level around 2-4 heroes each color per year. Maybe some more if you play in a high end alliance. So if you’re extremely lucky in one color and have 10+ heroes waiting before you could think about leveling dupes, you can probably feed them away.