I don’t know if more people are being dumb, but I do think railroad crossings are really poorly handled at least in the US where I’ve seen them.
Number one, the problem mentioned by @Briny_Deep should be resolved. It should be completely forbidden to leave a crossing in place across the road if the train tracks are no longer in service. As soon as a line is out of service (and have some rules about minimum number of trains having crossed any particular area of track every week/month/whatever to be considered in service) any crossings that go over roads must be removed. Rip out those tracks that cross the road, rip out the signage, etc. There should never be a place where there’s tracks that cross a road but no trains ever go over them, allowing people to get used to crossing tracks without looking. If there are tracks, you should know for a fact that sometimes trains go over them so you need to be wary.
Two: All crossings must have a mandatory sight-distance possible while approaching. Approaching a crossing, you should always be able to see far enough that you can clearly see a train approaching, anytime it is closer than three times the amount of time it takes a slow-moving vehicle to fully clear the tracks. That way if you look and see it’s clear just before you hit the gas to drive over the tracks, you know it’s clear long enough to clear the tracks. And the sight line can’t require nosing your way up until you’re practically on the track; you’ve got to have that much sight well before getting in even the potential danger zone. So, sitting in a car - specifically, one of those oldschool land-yachts with a hood long enough to have a picnic on - you could clearly see the train approaching. If you can’t clear a direct sight-line that long, because of buildings, trees, etc, then the crossing must have mirrors installed so that the driver of the car can use those mirrors to see pretty much directly down the track, and those mirrors need to be well-maintained.
In addition, all crossings must have warning lights. They don’t all need bars, but they must ALL have lights. Two independent/redundant sets of them. This has two purposes: one, to warn people that are too impatient/stupid to stop and look for themselves, but the more important one is to take into account the rise of the self-driving car. Those warning lights need to be of a clear, universal design, easily recognizable by a self-driving vehicle approaching them.
With these precautions in place, it is vanishingly unlikely that anyone could accidentally be on the tracks; anyone on them is there intentionally, or because of their own stupidity.
Which brings me to the final part of the resolution: build the trains (including passenger trains) sturdier so that they don’t have to stop if they hit something on the track, as long as the thing on the track isn’t a damn tank. And make sure the regulations allow them to keep going in case of a collision, as long as the train isn’t in danger.
In addition, automate them so that there’s no person being traumatized by feeling responsible for the deaths of intentional suicides. Some people want to kill themselves, and being hit by a train is a very effective way to do that. We’re probably not going to stop that from happening unless we provided free suicide booths or something to replace the trains, so we should look at minimizing the harm caused to others, like the poor train conductors.