Am I allowed to take a red 5 after reaching?
I think most "official" rules will not allow you to do this. (For reference, I looked up the Japanese Mahjong rules from the European Mahjong association here.)

In principle, I think swapping tiles that do not change the wait structure would be allowed, but it is impossible to verify. In your example of swapping the 5 for the 8, all that is visible is the discarded 8. From an outsider perspective, it is possible that you completed a different meld and simply discarded an 8 from 5-6-7-8 in hand.

It also appears that the hidden kan/kong is allowed, but only when the pung is isolated and cannot be interpreted as a different set of melds (e.g., you cannot draw and complete a kong if you have 1-1-1, 2-2-2, 3-3-3, because those tiles could be interpreted as 1-2-3, 1-2-3, 1-2-3).