For an open system, you have to be able to respond to arbitrary visual input. For a closed system, there shouldn't be random stuff on the right of way.
At-grade ("Level") crossings should be closed (and thus grade separated). Where that's impractical there are numerous options for ensuring the crossing is not open to railway traffic until it is clear:
In some areas it can be practical to employ a person whose duties include verifying that this crossing is clear and then authorising its use. Because CCTV is cheap now we can fit cameras and lighting and have them do this remotely for a large portion of the network.
Or we can use radar to protect crossings. The barriers drop, and then radar is activated (the small hazard introduced by using radar is mitigated because the crossing is closed, nobody should be in the area being illuminated by the radar anyway), if somehow there is a large object on the crossing even though the barriers are down, this means something went wrong. The outward flow barriers re-open to potentially allow a trapped driver or animal to leave and the system tries again, if this doesn't help the crossing is considered failed and humans go to investigate, they will find your broken down semi-truck.
The freight car should preferably be harmlessly derailed by trap points. If this is impossible (and the layout cannot be rectified) the presence of the freight car should trip sensors, either axle counters or track circuits, and close the section to traffic. Again humans will likely have to come investigate how that occurred when it cannot be explained and won't go away.
At the crossing are boards indicating that this is a railway crossing, two sets of lights for each direction of traffic (two amber, one red in each set) and barriers, typically long motorised boom arms from which a flimsier but more visible structure hangs, plus a tall post with CCTV cameras mounted on it. The CCTV feed goes with all the other signal data to either a "signal box" not so far away, or a larger centre where many signallers work together. A signaller who wishes to move a train through the crossing views the CCTV feed, and initiates a sequence in which the lights show alternating amber ("caution, stop if possible"), then red ("stop"), the barriers close road lanes entering the crossing, then barriers close the road lanes which exit the crossing. The signaller verifies everything is as intended (e.g. no vehicle stranded on the crossing, no idiot pedestrians clambering over the barrier and standing on the railway) and then authorises trains to pass. Once as many trains as necessary have passed, the signaller closes the crossing to trains, and tells the crossing to re-open to road traffic, it raises the barriers and then switches off the red "stop" lights and road users can now use it as normal.
I'd take Amtrak to my hometown, and the engine would blow past the platform at 20+mph and still stop the passenger cars right on the platform. Riding on the train and it seemed like they'd miss it.
I think the weight of a car itself wouldn't change the theoretically possible stopping distance, since the momentum is proportional to the mass, but so is the friction between wheel and track, so mass cancels out.
Purpose-built automated lines often use smaller cars with more powerful motors sometimes concrete tracks. I suppose those help computers in flattening acceleration/deceleration curves and eliminating needs to compensate for weather or passenger counts.
There are GoA 4 systems in use in the world. The difference is that every DLR train has a trained operator onboard whereas in a GoA 4 system the nearest employees are in some distant operations centre, watching only via a CCTV connection. GoA 4 trains are entirely autonomous, if one were one day to somehow break down so badly as to be inoperable a separate team would need to go rescue it and meanwhile other trains would simply stop at a station and allow their passengers to disembark.
Usually there is no operator onboard. But is still GoA 3 because emergency situations are handled by operators from a control room.
Look around, you will see there is a person wearing a uniform who is perhaps helping tourists figure out where they need to change trains, or assisting a woman struggling with shopping and a push chair. These are TfL employees trained to drive the train, even though it's autonomous.
Before the train leaves, even under normal autonomous operation, this person in the uniform activates a "close doors" control and this is the only reason a DLR train will close its doors. When the doors are closed and the way ahead is clear the train will drive itself to the next station, and open the doors, the cycle repeats.
The person wearing the uniform is trained to safely operate a train. Any time they're on first shift they actually sit at the front (usually occupied by excited children) and unlock the onboard controls to literally drive the train for route verification purposes. Autonomous trains aren't looking, and tools or equipment may be left on the track by work gangs (despite a "count it out, count it in" procedure) so the first trip of the day is always done manually.
You can't drive a DLR train from the control room.
Don't try to compare closed tracks to open tracks. A closed track is more like an elevator.