For mechanical penalties like gearbox and engine changes there should be a time penalty enforced after the race. Either 10 or 20 seconds would be fine. For example, Hamilton in Spain this year had to start from the back because the car was not fuelled properly. Let him start from the front and have a proper race. The number of points he loses will depend on how well he races, with the possibility of finishing 20 seconds ahead of everyone else and taking full points.