That is some genius thinking ! I've never thought about that. Definitely gotta head into my garage and mock something up now..I set up the old hanging tennis ball in the garage for the wife's car. She pulls in, never know where she'll end up. I moved the car in as far as I wanted her, with room to access the trunk. Then I hung an old tennis ball using 40 lb fishing braid from the ceiling, so that it just touches the windshield in front of the driver. Now she pulls in straight to the ball, and stops when it moves. That's kept her out of my tool bench and work space for years. I have a small hook in the ceiling several feet away from where the ball hangs. I use a stick with a notch in the end to lift the line and drop it in the hook, raising them way out of headspace when I'm using more space in the garage to work.
I did the same thing with one of those skinny driveway markers for the truck for when I back it in. You know, the thin flexible, reflective orange rods you stick in the ground for the winter. It hangs from the ceiling right where I want the tailgate to stop when I back in, and where I know the nose is away from the garage door. It's upside down so the rounded tip is downward. No sharp ends to scratch paint. The lower end drops below the top of the tailgate level. I can tell instantly when I bump it. I hung it closer to the garage wall, and I put a hook in the wall. To move the stick out of the way for projects, I just grab it and swing it over to the wall and trap the string in the hook.
I'd take pics but the cup hooks I use for the string are way too small to show up. So here's a couple of simple diagrams.
All of this is of course far cheaper than getting parking sensors for the garage with their cheesy looking traffic light setups.