Really? I haven't noticed knights dying all *that* often, yes it happens regularly that they get wounded, some die etc, but its not like its even 1 every battle or anything.
are you guys having bigger battles than me maybe? Longer ones?
Is there an increased chance of death when you lose or get stack wiped?
Knights dying in combat isn't something that should happen often to competent players except in the early game where they have few troops and quite possibly knights with low prowess values.
Knights are in many ways just like any other unit - they have a damage and a toughness value. Their base damage is 100 per prowess and their base toughness is 10 per prowess.
This is then adjusted by the knight effectiveness value.
Which is why the Gallant tree is so important for early warfare as a minor power, since you have few troops and your knights make up a major part of both your offensive and defensive strength. For a prowess 10 knight, that 75% extra effectiveness equates to another 750 damage output and 75 toughness. Later on buildings become most important for boosting knight effectiveness (military academies for feudal), but even in early warfare as tribal, you should be building war camps for more knights and the knight efficiency boost.
Think MAAs boosted by dozens of buildings are tough? They are. Extremely tough. But even mediocre knights gain toughness on the same scale without any buildings as default, and that's before taking lifestyle or other ways of boosting the knight effectiveness into account. High prowess knights with high effectiveness? They are almost unbelievably tough.
Knights can die during battle, but are extremely unlikely to unless they have low prowess. In ordinary fighting they are as noted above extremely tough.
They have their own events for getting maimed or killed in battle and barring knight-vs-knight interactions such as berserker, it is very difficult to get rid of a high prowess knight. The higher the prowess the lower the risk, scaling linearly; At 40+ prowess a character is nearly immune to getting maimed, at 30+ nearly immune to getting killed. There's still a risk, but it is very, very, low. Furthermore, there's outright immunity to death so long as your side outnumbers the other 5:1, so you are not going to see your knights dying in battles where you are mopping up over small enemy stacks.
EDIT:
@Wethospu mentions
in a post below that he has tested with a high casualty conversion factor without seeing any knight deaths except by event, which strongly suggests that the knight combat events are the only way for knights to die in combat. If anybody has a counterexample, let us know.
Of course, if you have many knights and fight often you will see them die every now and then, and if you have long close fought battles where you end up with few troops you may see a bloodbath amongst your knights during a last stand, and perhaps you fight some climatic battle against an enemy that also has lots of high prowess knights with high knight efficiency and experience mutual knight annihilation, but these cases ought not to occur regularly.
Knights can also die or be captured if an army loses a battle; this is a separate knight-only check.
If your knights are dying frequently, then they either have low prowess, are in long battles and hence have more chances to die, or you are cursed. Possibly all three. But outside the early game where your options are restricted, strategic miscalculation remains the most likely root cause.
There are mods to make combat less dangerous, but frankly I don't see the need given the plentiful tools available to making your knights shine.
EDIT: Tidied up and clarified.
-----
I realize this does not address the OPs question about whether the AI should use sons - and especially heirs - less as knights due to the risks involved. That is a hard question, since for roleplaying reasons it definitely should use heirs as knights, but since the AI is almost per definition incompetent, it would probably work better if the AI was more careful in that respect and didn't allow low prowess sons to be knights except when in extremis.
Players, however, ought not to have major problems keeping most of their knights alive if they invest in having good knights, and if they don't players should protect those sons who deserve it for the master plan and expose those who don't to the dangers of battle.