There are a few guys that rebuild/restore them properly (NOT small engine shops, don't waste your time). A Tecumseh flathead from a snowblower donor with your tins installed is a cheap(ish) way to run it, look right and preserve the original engine. A 5hp HS50 looks identical to your 4hp HS40 externally, you'll just have to research the swap because of the longer Rupp specific PTO length your engine has now.
Bike looks nice, It'd be a shame to put a Chinese engine in it IMHO.
Black Friday is coming, for less than a proper, original Rupp HS40 sells for outright you can buy a Coleman minibike and go ride instantly if you don't want to fix your vintage minibike.