I’ve tried using a couple of the eBay units with caps and yes, they will “bridge” a very short power interruptions BUT, as GRJ says, they are overkill in terms of size and you’d need to add an RF component to avoid compromising a DCS signal if you use that system.
Basically the smallest ones I found were actually the full width of a scale passenger car (c. 2” long) and so take up a lot of space. You are better off with GRJ’s dedicated LED lighting sets that have the DCS protection built in.