Please keep in mind that the aluminum foil reflects heat. Because of that, it will result in uneven cooking. In addition to that, it will indeed damage the heating element in the oven. That is why it is not worth the risk.
Find out more tips and tricks in the link below.