It is possible to repair as you suggest but only if you know board to be dry and be VERY carefull with the foam; inject it through one hole but have another to let excess out. Do it in a warm room . (foam is lighter /expands more in warm) and be very carefull to not inject too much;it carries on expanding after leaving container. (unless you use 2 part; in which case be even more carefull !!! It will "blow" your board up beyond repair if you either inject too much or excess isn`t allowed out. (I know from experience !!!)
Other issue is to make sure foam you use does not corrode foam in board !!! Some foams will "eat" the board foam .(Especially if board foam is polystyrene based) (You end up filloing one hole and making another !! Dont ask why I know !!!) (Do a check first with a bit of foam from the holes)
I`ve got an old F2 (power glide) which was really soft under footstraps.Repaired as mentioned and its still going 3 years later. (Cover holes with epoxy putty; I didnt bother with glass etc; holes were small)
Good luck !!!