How do I snap a vertex along a local axis?
Look at TinyCAD, aside the for me only downside that the edges need to be in the same mesh, it should be the perfect solution for you. It comes with Blender and can be activated in the preferences.

In your case i then would:


Create a duplicate of the edge from the lower object with Shift+D
Leave it in place by pressing RMB
Separate by selection with P press Enter to accept the first choice.
Go in Object Mode and select the new object and the upper object
Join those objects with Ctrl+J
Now you select the joined object, go in Edit Mode and use the "V2X - Vertex at intersection" function of TinyCAD in the RMB menu.
You get a new vertex at the intersection, which you can then use to merge the corner of the upper object on.


As i mentioned, the add-on has the drawback that it needs you to join meshes, so i forked the add-on and adjusted the V2X function, if you have more of those situations it might be interesting for you to check it out.
My forked version got merged, so here the link to the original repository.
TinyCAD/b28branch

Here a little explanatory visual:



This version is for Blender 2.8+
You can replace the files in the "scripts\addons\mesh_tiny_cad" folder of your Blender installation. I recommend to make a backup of the files first.