As you have surmised it is helpful to block off the water sources at the edge of the map before you can drain the caverns. There are a few options available to do that. Magma is certainly one of them. There is also the cave-in method for dealing with aquifers. You can drop natural stone into the water from above with a cave in. This is one of the few cases where I would consider magma to actually be the safer method. If you had just one z-level of water you could also pump the water out while building walls, however your question implies that you have more than one z-level of water to deal with at the edge of the map.
Bridges will not help unless they are both built under the level of the water and are raising--as opposed to retracting--bridges. Even then a bridge would only block off one z-level of inflow. The only advantages using bridges rather than walls to block inflow would have is that bridges are controllable, and take fewer rocks to build. Although if you wanted controllable you could block off the flow, build bridges (or doors or floodgates) behind the blockage and then unblock the flow. You would want to be sure to connect all your gates etc to levers (and be aware that bridges open opposite to doors and floodgates).
Blocking the flow is not necessarily the only way to drain the caverns however. Water flows in from the side of the map with a maximum rate per edge tile. If you can drain the water off faster than that then you can get some space to build a blockage, or even just drain the entire cavern. You might consider the instructions for draining unwanted water given by the wiki.
If you take this method, though, be sure you will have a great enough drainage rate before you connect to the flooded area.