Extension should not go beyond between the height of the marginal ridge and the triangular fossa. If such thing happens, the marginal ridge thins out and is prone to fracture.
The exact measurements of the remaining marginal ridge are as follows: Premolar: 1mm, Molar: 1.6mm
The outline of the proximal walls of the cavity preparation should also follow the external surface of the proximal tooth.
As you approach proximal walls, the bur is angulated in such a way that the walls in these are slightly diverge occlusally. This strictly follows the configuration of the enamel rods in this region (which is also diverging) thus minimizing the presence of unsupported enamel.
However, overdoing the divergence just for the sake of doing a divergence is a bad habit because of the risk of thinning out the marginal ridge instead. Some would say, “Oh, I think my divergence in this are is not so clear, I think I should do more!” Please do not do this. If you did a slight angle of your bur in this area then that’s it. So, keep in mind that by doing a slight a divergence in this area is because of the anatomy and direction of the enamel rods and not just because of just doing so.