Note: groups.io will be down for maintenance on Wednesday, October 5th, starting at 9AM Pacific Time (4PM Wednesday October 5, 2022 UTC), for approximately one hour.
I've seen lift bridges done a couple of different ways. I don't know that there is any particular better way than any other. I'd worry about finding a good way to make sure that the rails on your bridge reliably line up each time.
You can get "big" micro switches that can handle the track current and you don't necessarily need the relay. But maybe you might want to drive some signals, too. So you would need a relay or some other things to accomplish doing this as well.
The main electrical thing to worry about is cutting the power far enough back from the open bridge that a train with momentum doesn't careen into the open abyss. Also, you have to worry about locomotives with stay alive circuits. If you cut the power, these locomotives won't stop.
In the early days of DCC, there was DCC braking. I haven't heard this mentioned in a LONG time. I don't know if decoders made today support it. As I recall, you used a relay to put a brake signal on the track instead of the normal DCC track power/signal.
Wiring for DCC