You could get the widget settings the same way the admin page does. Make a list of widget areas, then fetch the data for each widget. Then, filter the returned object for the specific widget you're looking for.
Those hooks weren't working the way they were meant to, that's why they are deprecated. If you need to do a one time operation when the plugin is installed. Just set a flag in the database stating that the operation is done so it is not repeated on every restart of NodeBB.