A lot of diesels can run off of any vaguely fuel-like liquid you decide to put in them, so I'm sure sufficiently knowledgable people would keep those running, machining parts for them etc.
But electric vehicles are by far simpler than both of those, and generating electricity is easier than producing fuel you can shove in a diesel engine.
The Internet really overstates this. Fuel injected systems are sealed. Carbureted systems are open to outside air, so the fuel is constantly evaporating, leaving residue behind, and absorbing moisture from the atmosphere.
Gasoline in a sealed container remains usable for far longer than people on the Internet say it will.
Anyway, the final state of an apocalypse car would be running on wood gas. North Korea runs some or all of their military trucks on it (this may have changed as they've increased relations with Russia). An episode of Car Talk explained how it was used by German civilians during WWII:
Electric engines might be, but battery tech for sure isn't. Building a combustion engine + fuel vs. building an EV battery is a whole different game.
Meanwhile, third party motor controllers for Tesla motors exist, and the batteries aren't exactly magic.
There's really nothing about electric drivetrains that makes anything vastly more locked down.