Always consider wires entering your box as untrustworthy. Even if the upstream device has current limits, that does not prevent that wire from being dragged across the battery terminals during maintenance.Usually the voltage divider on 12V inputs is sufficient for most automotive wiring screwups. But static discharges are thousands of volts. ESD protection via TVS diodes is pretty easy these days.Look up "load dump". That is the most violent electrical event that can occur in a vehicle.
IMO, the 10k series led resistors for the PC817's are marginal. Given the current transfer ratio of those parts, I'd consider lower value series resistors for better noise immunity. They may work on the bench but add some noise and a higher ambient and you may have issues.I'd also be cautious of relying on the internal pull up resistors. They are relatively high values and not the best for noise immunity. In addition, there is the question of minimum load requirements when you're replacing filament lamps with solid state inputs. Lots of unknowns there, depending upon the age of the vehicle.