Is it still impossible to get infections via surfaces e.g. public restrooms? If someone with an std leaves urine behind, can you contract their std?

Generally not. Germs require some sort of supportive environment to survive. While they are infecting humans they live/thrive within/on certain surfaces or tissues. Urine as a waste product is somewhat toxic. As it sits outside the body & dries, any germs die from exposure to that drying or oxygen. It is actually difficult to get many of these STD's to grow in the lab unless you have specialized support media.