Light one each time a driver has 4 wheels cross a white line. 4 lights during the race weekend and confirmed as avoidable by the driver in question means a penalty - and if it happens during qualifying, stewards would be sent a timestamp for each violation so they can check and penalise quickly
This would be the safest solution and therefore has a lot of merit but I would hate the likelihood that penalties may still be imposed after the end of the race...
I am not especially picky as to what the penalty is - the penalty could probably be very light, so long as it is penalised promptly, the penalty is declared (so
not done as Technical Briefing AH-1348965...) and everyone is treated equally. The problem is that while there is a decent chance of bad driving being flat ignored, practically any penalty will not suffice to contain the problem.
If I had to declare a favoured choice of penalty (assuming it's not a track where the punishment is automatic such as Monaco), I'd be in favour of a drive-through on the fourth light appearing, unless the stewards can see there was something improper about one or more incident that means that one or more of the lights was unfairly awarded. I'd allow three fully-green-flag laps or six minutes (with a fully-green-lap being worth two minutes, in case of incidents near the end of the race) for stewards to decide on an exemption, with the light confirmed if no exemption is given... ...and the penalty formally being issued at the end of that period. I do not think it is unreasonable to have six-minute gaps between the qualifying sessions, or between race end and the podium in a regular race. (I would see Race Control's informing of the stewards of any problems as an automated process, so the possibility of Race Control being otherwise occupied at race end should not be a problem, and in-race larger problems would be covered by laps involving yellow flags not being counted - when those happen near the end of the race, it's rarely an issue if these get further investigation post-podium).