Some models of Shimano calipers do use a pad retaining bolt so what you've pictured should be viable. I would make sure the bolt's diameter is small enough so it has a little play in when through the pad and caliper holes. The pads shouldn't move around at this point, but like with a pin, a thinner bolt will allow some play which maybe necessary for proper function. If they bind, it may prevent their return to the ready position, the spring may not open normally and rub the rotor, etc. Leave a little play like the system is designed with.
There are few designs of pins that may work well, even a safety/diaper pin of sufficient size. This design of retaining pin is made to remove by hand, or you could use an Allen key from your multi-tool through the loop of the pin to generate more pulling power. It will have to have sufficient length so that the secondary arches will fit over the raised area of the caliper that has the hole the pin goes thru.
Here's something designed to hold parts or fasteners in the event they've come loose.
Here's a link to this product and description.
I don't feel using the Shimano provided, common cotter pin is absolutely necessary and options exist that will work just as well.