I find the infrared sensor values seem to fluctuate a lot in different light conditions, and depending on the surface in front of them. In the datasheet for my infrared sensor, it had different specs for dark or light targets, and I suspect shiny or dull also makes a difference. For parking the same car, that may not be an issue.
I don't have any experience with the ultrasonic, but I can see how it wouldn't immediately be better by not being subject to those specific limitations. I also had to oversample quite a bit - ten or more samples seemed to get a good approximation of distance with infrared.
However, if you are using two ultrasonic sensors, one for side/side and the other for front/back positions of the car, their bouncing echos may interfere with each other unless the sensors are timed appropriately.