Devolution doesn't happen explicitly. Evolution can be forced in the opposite direction though. This could match what you intend to do.
The driving force behind evolution
For this example I am going to take resistance to antibiotics as evolutionary trait, but this is pretty much extensible to most other things.
Competition is the driving force behind evolution. In bacteria, it is a constant race to be able to divide as fast as possible. Faster than your neighbor. After all, if you grow fastest, there will be more yous.
In an environment where no antibiotics exist, the bacteria that can convert the surroundings into energy the fastest wins out. However, when we introduce an antibiotic that mimics the surroundings, but instead of being broken down, blocks the mechanisms of the bacteria, this all changes.
That efficient bacterium will not be able to divide as efficiently anymore. So suppose there also is a bacterium that has another gene that allows it to prevent the antibiotics from entering its cell. This means that in the presence of antibiotics, this bacterium has an enormous advantage, because it isn't hindered by the antibiotics and will be able to divide just as normal. This is generally how resistance to antibiotics propagates through the population of bacteria.
So what about "devolution"?
There is one important piece here. Resistance to antibiotics isn't free. In this example it is producing some protein that blocks antibiotics, in another example it could be a modified protein that isn't a viable target anymore to antibiotics, but in (almost) every case, this resistance has a cost. Having to produce a protein, having a less efficient enzyme, and so forth.
This doesn't matter in the presence of antibiotics, living is more important than that bit of energy. When there are no antibiotics however, these resistant bacteria are at a disadvantage. They are expending energy for something that has no benefit for natural selection anymore. The effect is that the unresistant bacteria will be growing faster and thus will be selected for.
So what does this have to do with devolution?
You can interpret this as devolution of the species, because the selecting criterium has been removed/changed so that what was selected for at first, is no longer useful. This doesn't immediately mean that that trait will be explicitly selected away, but given that most traits like this cost energy, if they are unneeded, they will eventually disappear.
As another example, there are plenty of species that at some point in their evolutionairy tree had limbs, but developed in such a way that they did not need them anymore. Take whales for example. We know they have had limbs at some point, because there still are rudimental bonestructures looking like limbs. They have been evolved away though. There was no need for them, so there was no driving force preventing mutations that lowered effectiveness of these limbs. These traits might even have been beneficial, as growing limbs costs energy. Energy better spent growing fins for example.
So to properly simulate the "Devolution of a trait or species", it is important that the selecting factor (if there is one explicit factor) is removed or made redundant.
Important to note here though is that this is mostly devolution from the perspective of a certain trait, like legs. First legs evolve, then they evolve away again. This happens. Species turning back into older species is much less likely, because it is so many traits that have all changed, that would have to be selected against suddenly.