It is the position of the unit when the charge is declared that determines which face is charged. At that time red does not have a base in black's flank and so cannot charge the flank. A drilled move cannot change this situation.
When the elephant fails a break test and flees from combat, the initial move is the same as any other unit'd flee move, the rules for stampede movement apply to it other than the direction of the initial move.
Guys- an elephant stampedes if it fails a Cohesion test caused by shooting casualties or the loss of its mahout. If it loses a combat and fails its break test it flees in the same direction as other troops. So the only time the issues raised above could occur is if the elephant is attacked in the fl...
I don't think many people would object to your solution, it's main effect is to give you a disadvantage when attacked in flank and you can always work out the correct numbers of bases to be in contact.